15 const char funcname[] =
"Average_Plaquette";
23 __managed__
double hgs = 0; __managed__
double hgt = 0;
26 double hgs = 0;
double hgt = 0;
27 for(
int mu=1;mu<
ndim;mu++)
28 for(
int nu=0;nu<mu;nu++)
31#pragma omp parallel
for simd reduction(+:hgs,hgt)
32 for(
int i=0;i<
kvol;i++){
40 default: hgs -=
creal(Sigma[0]);
48 *avplaqs=-hgs/(3.0*
gvol); *avplaqt=-hgt/(
gvol*3.0);
52 printf(
"hgs=%e hgt=%e hg=%e\n", hgs, hgt, *hg);
57#pragma omp declare simd
59 const char funcname[] =
"SU2plaq";
60 int uidm = iu[mu*
kvol+i];
65 int uidn = iu[nu*
kvol+i];
75 const char funcname[] =
"Polyakov";
102 for(
int it=1;it<
ksizet;it++)
103#pragma omp parallel
for simd
104 for(
int i=0;i<
kvol3;i++){
107 int indexu=it*
kvol3+i;
110 Sigma[1][i]=Sigma[0][i]*ut[1][indexu+
kvol*3]+Sigma[1][i]*
conj(ut[0][indexu+
kvol*3]);
122#error Par_tmul is not yet implimented in CUDA as Sigma[1] is device only memory
125 printf(
"Multiplying with MPI\n");
127 Par_tmul(Sigma[0], Sigma[1]);
138#pragma omp parallel for simd reduction(+:poly)
139 for(
unsigned int i=0;i<
kvol3;i++)
140 poly+=
creal(Sigma[0][i]);
double Polyakov(Complex_f *ut[2])
Calculate the Polyakov loop (no prizes for guessing that one...).
int SU2plaq(Complex_f *ut[2], Complex_f Sigma[2], unsigned int *iu, int i, int mu, int nu)
Calculates the plaquette at site i in the direction.
void cuPolyakov(Complex_f *Sigma[2], Complex_f *ut[2], dim3 dimGrid, dim3 dimBlock)
Calculate the Polyakov loop (no prizes for guessing that one...).
int Average_Plaquette(double *hg, double *avplaqs, double *avplaqt, Complex_f *ut[2], unsigned int *iu, float beta)
Calculates the gauge action using new (how new?) lookup table Follows a routine called qedplaq in som...
void cuAverage_Plaquette(double *hgs, double *hgt, Complex_f *u11t, Complex_f *u12t, unsigned int *iu, dim3 dimGrid, dim3 dimBlock)
Calculates the gauge action using new (how new?) lookup table Follows a routine called qedplaq in som...
__device__ __forceinline__ T conj(const T &z)
Complex Conjugation.
int Par_dsum(double *dval)
Performs a reduction on a double dval to get a sum which is then distributed to all ranks.
int * pcoord
The processor grid.
#define AVX
Alignment of arrays. 64 for AVX-512, 32 for AVX/AVX2. 16 for SSE. Since AVX is standard on modern x86...
#define gvol3
Lattice spatial volume.
#define ksizet
Sublattice t extent.
#define kvol
Sublattice volume.
#define gvol
Lattice volume.
#define kvol3
Sublattice spatial volume.
#define Complex_f
Single precision complex number.
dim3 dimGrid
Default grid size. First component is normally nt. Second and third depend whatever is needed to get ...
#define kvolHalo
Subvolume + halo size.
dim3 dimBlock
Default block size. Usually 128.
Function declarations for most of the routines.
#define creal(z)
Extract Real Component using C standard notation.