-
Notifications
You must be signed in to change notification settings - Fork 0
/
global.h
176 lines (116 loc) · 2.66 KB
/
global.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
#ifndef GLOBAL_H
#define GLOBAL_H
#if defined MAIN_PROGRAM
# define EXTERN
#else
# define EXTERN extern
#endif
#ifdef LongLong
# define INT8 long long
#else
# define INT8 unsigned long
#endif
#define PI 3.14159265358979323846
#define maxblockdim 512
typedef struct {
double re;
double im;
} complex;
typedef complex su3 [3][3]; /* su(3)-Matrix 3x3 komplexe Einträge */
typedef struct type_conf_info{
int dimension[4];
int ensemble;
double beta,plaq;
} type_conf_info;
typedef struct type_cksum{
INT8 sum;
INT8 bytes;
char file[80];
} type_cksum;
typedef struct SAPARAM_LIST{
double Tmin;
double Tmax;
double expo;
int N;
int checkint;
} SAPARAM_LIST;
typedef struct THERMPARAM_LIST{
int Nsweep;
int Nsave;
double beta;
int checkint;
int startcond;
} THERMPARAM_LIST;
typedef complex spinor[12];
typedef complex propmatrix[12][12];
typedef complex fbyf[4][4];
EXTERN int T, L, LX, LY, LZ, VOLUME;
EXTERN spinor ** g_spinor_field;
EXTERN int g_precision;
EXTERN int NMASS;
EXTERN int NKSQUARE;
EXTERN int ENSEMBLE;
EXTERN double PLAQ;
EXTERN double BETA;
EXTERN int JOB;
EXTERN type_conf_info CONFINFO;
EXTERN type_cksum * CHECKSUMS;
EXTERN type_cksum * GTRAFOCHECKSUMS;
EXTERN double FUNC;
EXTERN double DADA;
EXTERN double maxDADA;
EXTERN int g_numofgpu;
EXTERN su3 * g_gf;
EXTERN su3 * trafo1, * trafo2;
EXTERN int * nn;
EXTERN int * dev_nn;
EXTERN int * ind;
EXTERN int * lexic2eo;
EXTERN int * eoidx_even;
EXTERN int * eoidx_odd;
EXTERN int * dev_eoidx_even;
EXTERN int * dev_eoidx_odd;
EXTERN int * nn_eo;
EXTERN int * dev_nn_eo;
EXTERN int * nn_oe;
EXTERN int * dev_nn_oe;
/* the device gauge field */
#ifdef GF_8
EXTERN dev_su3_8 * dev_gf;
EXTERN dev_su3_8 * dev_gf2;
EXTERN dev_su3_8 * h2d_gf;
#else
EXTERN dev_su3_2v * dev_gf;
EXTERN dev_su3_2v * dev_gf2;
EXTERN dev_su3_2v * h2d_gf;
#endif
/* the device trafo field */
#ifdef GF_8
EXTERN dev_su3_8 * dev_trafo1;
EXTERN dev_su3_8 * dev_trafo2;
EXTERN dev_su3_8 * h2d_trafo;
#else
EXTERN dev_su3_2v * dev_trafo1;
EXTERN dev_su3_2v * dev_trafo2;
EXTERN dev_su3_2v * h2d_trafo;
#endif
/* the device staple field */
#ifdef GF_8
EXTERN dev_su3_8 * dev_staples;
#else
EXTERN dev_su3_2v * dev_staples;
#endif
// used for global summation of parts of the functional
// every threadblock produces F for a sublattice
// must match the configuation (BLOCK) in <<< , >>>
EXTERN double* redfield_F;
EXTERN double* redfield_dAdA;
EXTERN double* redfield_maxdAdA;
EXTERN double* redfield_plaq;
EXTERN size_t dev_spinsize;
EXTERN size_t output_size;
EXTERN int* dev_grid;
EXTERN double * dev_output;
EXTERN float * dev_rndunif_field;
EXTERN float * dev_rndgauss_field;
#endif