su2hmc
Loading...
Searching...
No Matches
Debugging Functions

Functions

void Force_debug (double ave_dSdpi[3], double *dSdpi)
 Gets average for each generator of the Lie algebra.

Detailed Description

Function Documentation

◆ Force_debug()

void Force_debug ( double ave_dSdpi[3],
double * dSdpi )

Gets average for each generator of the Lie algebra.

Parameters
[out]ave_dSdpiThe average
[in]dSdpiWhat's being averaged. Can be the momentum either
Postcondition
ave_dSdpi overwritten with the averages.

Definition at line 19 of file integrate.c.

19 {
20#ifdef USE_GPU
21 ave_dSdpi[0]=cureduce_sum_d(dSdpi,kvol*ndim,0);
22 ave_dSdpi[1]=cureduce_sum_d(dSdpi+kvol*ndim,kvol*ndim,1);
23 ave_dSdpi[2]=cureduce_sum_d(dSdpi+2*kvol*ndim,kvol*ndim,2);
25#else
26 ave_dSdpi[0]=0; ave_dSdpi[1]=0; ave_dSdpi[2]=0;
27 for(unsigned int i=0;i<kvol*ndim;i++){
28 ave_dSdpi[0]+=dSdpi[i];
29 ave_dSdpi[1]+=dSdpi[i+kvol*ndim];
30 ave_dSdpi[2]+=dSdpi[i+2*kvol*ndim];
31 }
32#endif
33 ave_dSdpi[0]/=(ndim*kvol); ave_dSdpi[1]/=(ndim*kvol); ave_dSdpi[2]/=(ndim*kvol);
34 return;
35}
double cureduce_sum_d(double *input, const unsigned int n, const unsigned short stream)
Sum all terms in an array of doubles.
#define kvol
Sublattice volume.
Definition sizes.h:163
#define cudaDeviceSynchronise()
Get rid of that bastardised yankee English.
Definition sizes.h:53
#define ndim
Dimensions.
Definition sizes.h:188

References cudaDeviceSynchronise, cureduce_sum_d(), kvol, and ndim.

Here is the call graph for this function:
Here is the caller graph for this function: