Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
ctr_offload.h
Go to the documentation of this file.
1 /*Copyright (c) 2011, Edgar Solomonik, all rights reserved.*/
2 
3 #ifndef __CTR_OFFLOAD_H__
4 #define __CTR_OFFLOAD_H__
5 
6 #include "../shared/offload.h"
7 #include "ctr_comm.h"
8 
9 namespace CTF_int {
10  #ifdef OFFLOAD
11  class ctr_offload : public ctr {
12  public:
13  /* Class to be called on sub-blocks */
14  ctr * rec_ctr;
15  int64_t size_A;
16  int64_t size_B;
17  int64_t size_C;
18  int iter_counter;
19  int total_iter;
20  int upload_phase_A;
21  int upload_phase_B;
22  int download_phase_C;
23  offload_tsr * ptr_A;
24  offload_tsr * ptr_B;
25  offload_tsr * ptr_C;
26 
30  void print();
31 
35  void run(char * A, char * B, char * C);
36 
42  int64_t mem_fp();
43 
48  int64_t mem_rec();
49 
54  double est_time_fp(int nlyr);
55 
56 
61  double est_time_rec(int nlyr);
62 
66  ctr * clone();
67 
71  ctr_offload(ctr * other);
72 
76  ~ctr_offload();
77 
89  ctr_offload(contraction const * c,
90  int64_t size_A,
91  int64_t size_B,
92  int64_t size_C,
93  int total_iter,
94  int upload_phase_A,
95  int upload_phase_B,
96  int download_phase_C);
97 
98  };
99  #endif
100 
101 }
102 
103 #endif