MAGMA  1.2.0
MatrixAlgebraonGPUandMulticoreArchitectures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
magma_cbulgeinc.h
Go to the documentation of this file.
1 /*
2  * -- MAGMA (version 1.2.0) --
3  * Univ. of Tennessee, Knoxville
4  * Univ. of California, Berkeley
5  * Univ. of Colorado, Denver
6  * May 2012
7  *
8  * @generated c Thu May 10 22:26:25 2012
9  */
10 
11 #ifndef _MAGMA_CBULGEINC_H_
12 #define _MAGMA_CBULGEINC_H_
13 
14 #define PRECISION_c
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 
20 /***************************************************************************/
24  // maximum contexts
25 #define MAX_THREADS_BLG 256
26 
28  void findVTpos(int N, int NB, int Vblksiz, int sweep, int st, int *Vpos, int *TAUpos, int *Tpos, int *myblkid);
29  void findVTsiz(int N, int NB, int Vblksiz, int *blkcnt, int *LDV);
31 
32 
33 /*
34 extern volatile magma_int_t barrier_in[MAX_THREADS_BLG];
35 extern volatile magma_int_t barrier_out[MAX_THREADS_BLG];
36 extern volatile magma_int_t *ss_prog;
37 */
38 
39  /***************************************************************************/
42 /*
43 #define ssched_init(nbtiles) \
44 { \
45  volatile int prog_ol[2*nbtiles+10];\
46  int iamdone[MAX_THREADS_BLG]; \
47  int thread_num[MAX_THREADS_BLG];\
48  pthread_t thread_id[MAX_THREADS_BLG];\
49  pthread_attr_t thread_attr;\
50 }
51 */
53 
54 
55 
56  struct gbstrct_blg {
57  cuFloatComplex *dQ1;
58  cuFloatComplex *dT1;
59  cuFloatComplex *dT2;
60  cuFloatComplex *dV2;
61  cuFloatComplex *dE;
62  cuFloatComplex *T;
63  cuFloatComplex *A;
64  cuFloatComplex *V;
65  cuFloatComplex *TAU;
66  cuFloatComplex *E;
67  cuFloatComplex *E_CPU;
68  int cores_num;
70  int overlapQ1;
72  int NB;
73  int NBTILES;
74  int N;
75  int NE;
76  int N_CPU;
77  int N_GPU;
78  int LDA;
79  int LDE;
80  int BAND;
81  int grsiz;
82  int Vblksiz;
83  int WANTZ;
84  char SIDE;
87  volatile int *ss_prog;
88 } ;
89 extern struct gbstrct_blg core_in_all;
90 
91 
92 
93 
94 
96 
98 #define MAX_EVENTSBLG 163840
99 //#define MAX_EVENTSBLG 1048576
100 
101 int event_numblg [MAX_THREADS_BLG] __attribute__ ((aligned (128)));
102 real_Double_t event_start_timeblg [MAX_THREADS_BLG] __attribute__ ((aligned (128)));
103 real_Double_t event_end_timeblg [MAX_THREADS_BLG] __attribute__ ((aligned (128)));
104 real_Double_t event_logblg [MAX_THREADS_BLG][MAX_EVENTSBLG] __attribute__ ((aligned (128)));
106 
107 #define core_event_startblg(my_core_id)\
108  event_start_timeblg[my_core_id] = get_time_azz();\
109 
110 #define core_event_endblg(my_core_id)\
111  event_end_timeblg[my_core_id] = get_time_azz();\
112 
113 #define core_log_eventblg(event, my_core_id)\
114  event_logblg[my_core_id][event_numblg[my_core_id]+0] = my_core_id;\
115  event_logblg[my_core_id][event_numblg[my_core_id]+1] = event_start_timeblg[my_core_id];\
116  event_logblg[my_core_id][event_numblg[my_core_id]+2] = event_end_timeblg[my_core_id];\
117  event_logblg[my_core_id][event_numblg[my_core_id]+3] = (event);\
118  event_numblg[my_core_id] += (log_eventsblg << 2);\
119  event_numblg[my_core_id] &= (MAX_EVENTSBLG-1);
120 
122 
123 #ifdef __cplusplus
124 }
125 #endif
126 
127 #undef PRECISION_c
128 #endif
129 
130 
131 
132