Topics | |
| Site Indexing | |
Macros | |
| #define | MIN(x, y) |
| Return the max of two values. | |
| #define | MAX(x, y) |
| Return the min of two values. | |
Functions | |
| void | Transpose_z (Complex *out, const int, const int) |
| In place transpose used to convert from AoS to SoA memory layout. | |
| void | Transpose_c (Complex_f *out, const int, const int) |
| In place transpose used to convert from AoS to SoA memory layout. | |
| void | Transpose_d (double *out, const int, const int) |
| In place transpose used to convert from AoS to SoA memory layout. | |
| void | Transpose_f (float *out, const int, const int) |
| In place transpose used to convert from AoS to SoA memory layout. | |
| void | Transpose_I (int *out, const int, const int) |
| In place transpose used to convert from AoS to SoA memory layout. | |
| void | Transpose_U (unsigned int *out, const int, const int) |
| In place transpose used to convert from AoS to SoA memory layout. | |
| double | cureduce_sum_d (double *input, const unsigned int n, const unsigned short stream) |
| Sum all terms in an array of doubles. | |
| float | cureduce_sum_f (float *input, const unsigned int n, const unsigned short stream) |
| Sum all terms in an array of floats. | |
| void | cuTranspose_z (Complex *out, const int fast_in, const int fast_out, const dim3 dimGrid, const dim3 dimBlock) |
| In place transpose used to convert from AoS to SoA memory layout. | |
| void | cuTranspose_c (Complex_f *out, const int fast_in, const int fast_out, const dim3 dimGrid, const dim3 dimBlock) |
| In place transpose used to convert from AoS to SoA memory layout. | |
| void | cuTranspose_d (double *out, const int fast_in, const int fast_out, const dim3 dimGrid, const dim3 dimBlock) |
| In place transpose used to convert from AoS to SoA memory layout. | |
| void | cuTranspose_f (float *out, const int fast_in, const int fast_out, const dim3 dimGrid, const dim3 dimBlock) |
| In place transpose used to convert from AoS to SoA memory layout. | |
| void | cuTranspose_I (int *out, const int fast_in, const int fast_out, const dim3 dimGrid, const dim3 dimBlock) |
| In place transpose used to convert from AoS to SoA memory layout. | |
| void | cuTranspose_U (unsigned int *out, const int fast_in, const int fast_out, const dim3 dimGrid, const dim3 dimBlock) |
| In place transpose used to convert from AoS to SoA memory layout. | |
| void | cuMixed_Sumto (double *d, float *f, const unsigned int n, const dim3 dimGrid, const dim3 dimBlock) |
| Add a single to a double value, and save the output in the double array For complex valued arrays, one may cast the complex<double> and complex<float> arrays to double and float arrays, and use 2N for the array length instead. | |
| int | Init (const int istart, const int ibound, const int iread, const float beta, const float fmu, const float akappa, const Complex_f ajq, const float c_sw, Complex *u[2], Complex *ut[2], Complex_f *ut_f[2], Complex gamval[20], Complex_f gamval_f[20], unsigned short gamin[16], double *dk[2], float *dk_f[2], unsigned int *iu, unsigned int *id) |
| Initialises the system. | |
| int | C_gather (Complex_f *x, Complex_f *y, int n, unsigned int *table, unsigned int mu) |
| Extracts all the single precision gauge links in the \(\mu\) direction only. | |
| int | Z_gather (Complex *x, Complex *y, int n, unsigned int *table, unsigned int mu) |
| Extracts all the double precision gauge links in the \(\mu\) direction only. | |
| int | Fill_Small_Phi (int na, Complex *smallPhi, Complex *Phi) |
| Copies necessary (2*4*kvol) elements of Phi into a vector variable. | |
| int | UpDownPart (const unsigned int na, Complex *X0, Complex *R1) |
| Up/Down partitioning of the pseudofermion field. | |
| int | Reunitarise (Complex *ut[2]) |
| Reunitarises u11t and u12t as in conj(u11t[i])*u11t[i]+conj(u12t[i])*u12t[i]=1. | |
| int | ComplexConvert (Complex_f *a, Complex *b, const unsigned int len, const bool dtof, const unsigned short stride) |
| takes an array of complex float and double precision numbers and converts the precision | |
| void | Init_CUDA (Complex *u11t, Complex *u12t, Complex gamval[20], Complex_f gamval_f[20], unsigned short gamin[16], double *dk4m, double *dk4p, unsigned int *iu, unsigned int *id) |
| Initialise CUDA cuInit was taken already by CUDA (unsurprisingly). | |
| void | cuFill_Small_Phi (const unsigned int na, Complex *smallPhi, Complex *Phi, dim3 dimBlock, dim3 dimGrid) |
| Copies necessary (2*4*kvol) elements of Phi into a vector variable. | |
| void | cuComplex_convert (Complex_f *a, Complex *b, const unsigned int len, const bool dtof, dim3 dimBlock, dim3 dimGrid) |
| takes an array of complex float and double precision numbers and converts the precision | |
| void | cuReal_convert (float *a, double *b, const unsigned int len, const bool dtof, dim3 dimBlock, dim3 dimGrid) |
| takes an array of real-valued float and double precision numbers and converts the precision | |
| void | cuUpDownPart (const unsigned int na, Complex *X0, Complex *R1, dim3 dimBlock, dim3 dimGrid) |
| Up/Down partitioning of the pseudofermion field. | |
| void | cuReunitarise (Complex *ut[2], dim3 dimGrid, dim3 dimBlock) |
| Reunitarises u11t and u12t as in conj(u11t[i])*u11t[i]+conj(u12t[i])*u12t[i]=1. | |
| void | blockInit (int x, int y, int z, int t, dim3 *dimBlock, dim3 *dimGrid) |
| Initialises the CUDA grid and block size for a given lattice. | |
| template<typename T> | |
| __device__ __forceinline__ T | conj (const T &z) |
| Complex Conjugation. | |
| void | Q_allocate_f (Complex_f **p_f, Complex_f **x1_f, Complex_f **x2_f, Complex_f **r_f, Complex_f **X1_f) |
| Allocates memory needed for Congradq. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc. | |
| void | Q_allocate (Complex **p, Complex **x1, Complex **x2, Complex *clover[2]) |
| Allocates double precision memory needed for Congradq. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc. | |
| void | P_allocate_f (Complex_f **p_f, Complex_f **r_f, Complex_f **x1_f, Complex_f **x2_f, Complex_f **xi_f) |
| Allocates memory needed for Congradp. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc. | |
| void | P_allocate (Complex **p, Complex **r, Complex **x1, Complex **x2, Complex *clover[2]) |
| Allocates double precision memory needed for Congradp. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc. | |
| void | Q_free_f (Complex_f **p_f, Complex_f **x1_f, Complex_f **x2_f, Complex_f **r_f, Complex_f **X1_f) |
| Frees memory needed for Congradq. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc. | |
| void | Q_free (Complex **p, Complex **x1, Complex **x2, Complex *clover[2]) |
| Frees double precision memory needed for Congradq. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc. | |
| void | P_free_f (Complex_f **p_f, Complex_f **r_f, Complex_f **x1_f, Complex_f **x2_f, Complex_f **xi_f) |
| Frees memory needed for Congradp. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc. | |
| void | P_free (Complex **p, Complex **r, Complex **x1, Complex **x2, Complex *clover[2]) |
| Frees memory needed for Congradp. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc. | |
| template<typename T> | |
| __global__ void | Kernels::Gather (T *x, T *y, const unsigned int n, unsigned int *table, const unsigned short mu) |
| Extracts all the single precision gauge links in the \(\mu\) direction only. | |
| template<typename T, unsigned int bsize> | |
| __device__ void | Device::warpReduce_sum (volatile T *sdata, const unsigned int tid) |
| Performs a warp reduction for sum. | |
| template<typename T> | |
| __global__ void | Kernels::Transpose (T *out, const T *in, const int fast_in, const int fast_out) |
| Swaps the order of the gauge field so that it is now SoA instead of AoS and it is nice and coalesced in memory. | |
| __global__ void | Kernels::Mixed_Sumto (double *d, float *f, const unsigned int n) |
| Sums a float array into a double array. | |
| template<typename T, unsigned int bsize> | |
| __global__ void | Kernels::reduce_sum (T *g_in_data, T *g_out_data, const unsigned int n) |
| Performs a block reduction for sum. | |
| __global__ void | Kernels::Real_convert (float *a, double *b, const unsigned int len, const bool dtof) |
| takes an array of real float and double precision numbers and converts the precision | |
| __global__ void | Kernels::cuFill_Small_Phi (const unsigned int na, Complex *smallPhi, Complex *Phi) |
| Copies necessary (2*4*kvol) elements of Phi into a vector variable. | |
| __global__ void | Kernels::cuUpDownPart (const unsigned int na, Complex *X0, Complex *R1) |
| Up/Down partitioning of the pseudofermion field. | |
| template<typename T> | |
| __global__ void | Kernels::cuReunitarise (complex< T > *u11t, complex< T > *u12t) |
| Reunitarises u11t and u12t as in conj(u11t[i])*u11t[i]+conj(u12t[i])*u12t[i]=1. | |
| #define MAX | ( | x, | |
| y ) |
Return the min of two values.
| [in] | x,y | values being checked |
Definition at line 21 of file cusu2hmc.cu.
| #define MIN | ( | x, | |
| y ) |
Return the max of two values.
| [in] | x,y | values being checked |
Definition at line 14 of file cusu2hmc.cu.
| void blockInit | ( | int | x, |
| int | y, | ||
| int | z, | ||
| int | t, | ||
| dim3 * | dimBlock, | ||
| dim3 * | dimGrid ) |
Initialises the CUDA grid and block size for a given lattice.
| [in] | x,y,z,t | Lattice dimensions |
| [out] | dimGrid,dimBlock | CUDA grid/block size |
dimGrid and dimBlock initialised Definition at line 205 of file cusu2hmc.cu.
References BLOCKALERT, dimBlock, dimGrid, nt, nx, ny, and nz.
Extracts all the single precision gauge links in the \(\mu\) direction only.
| [out] | x | The output |
| [in] | y | The gauge field for a particular colour |
| [in] | n | Number of sites in the gauge field. This is typically kvol |
| [in] | table | Table containing information on nearest neighbours. Usually id or iu |
| [in] | mu | Direction we're interested in extracting |
x replaced with output Definition at line 291 of file su2hmc.c.
References Complex_f, kvol, and kvolHalo.
| int ComplexConvert | ( | Complex_f * | a, |
| Complex * | b, | ||
| const unsigned int | len, | ||
| const bool | dtof, | ||
| const unsigned short | stride ) |
takes an array of complex float and double precision numbers and converts the precision
| [in,out] | a | Float array |
| [in,out] | b | Double array |
| [in] | len | Number of elements to convert per stride. Striding needed to handle halo terms |
| [in] | dtof | If true, convert double to float. Otherwise convert float to double |
| [in] | stride | For terms with a halo, we need to convert in blocks of len separated by (len+halo) |
dtof, either the contents of a or b are overwritten with those of the other array in the opposite precision. Definition at line 420 of file coord.c.
References Complex, Complex_f, cuComplex_convert(), dimBlock, dimGrid, halo, and STRDERROR.
| __device__ __forceinline__ T conj | ( | const T & | z | ) |
Complex Conjugation.
| z | Number to be conjugated |
z Definition at line 33 of file cusu2hmc.cu.
| void cuComplex_convert | ( | Complex_f * | a, |
| Complex * | b, | ||
| const unsigned int | len, | ||
| const bool | dtof, | ||
| dim3 | dimBlock, | ||
| dim3 | dimGrid ) |
takes an array of complex float and double precision numbers and converts the precision
| [in,out] | a | Float array |
| [in,out] | b | Double array |
| [in] | len | Number of elements to convert |
| [in] | dtof | If true, convert double to float. Otherwise convert float to double |
| [in] | dimGrid,dimBlock | CUDA grid/block size |
dtof, either the contents of a or b are overwritten with those of the other array in the opposite precision. Definition at line 284 of file cusu2hmc.cu.
References Complex, Complex_f, dimBlock, dimGrid, and Kernels::Real_convert().
| void cuFill_Small_Phi | ( | const unsigned int | na, |
| Complex * | smallPhi, | ||
| Complex * | Phi, | ||
| dim3 | dimBlock, | ||
| dim3 | dimGrid ) |
Copies necessary (2*4*kvol) elements of Phi into a vector variable.
| [in] | na | flavour index |
| [out] | smallPhi | The partitioned output |
| [in] | Phi | The pseudofermion field |
| [in] | dimGrid,dimBlock | CUDA grid/block size |
Definition at line 288 of file cusu2hmc.cu.
References Complex, Kernels::cuFill_Small_Phi(), dimBlock, and dimGrid.
| __global__ void Kernels::cuFill_Small_Phi | ( | const unsigned int | na, |
| Complex * | smallPhi, | ||
| Complex * | Phi ) |
Copies necessary (2*4*kvol) elements of Phi into a vector variable.
| na | flavour index |
| smallPhi | The partitioned output |
| Phi | The pseudofermion field |
smallPhi Definition at line 76 of file cusu2hmc.cu.
References Complex, kvol, nc, ndirac, and ngorkov.
| void cuMixed_Sumto | ( | double * | d, |
| float * | f, | ||
| const unsigned int | n, | ||
| const dim3 | dimGrid, | ||
| const dim3 | dimBlock ) |
Add a single to a double value, and save the output in the double array For complex valued arrays, one may cast the complex<double> and complex<float> arrays to double and float arrays, and use 2N for the array length instead.
| [in,out] | d | Double array |
| [in] | f | float array |
| [in] | n | Array lengths |
| [in] | dimGrid,dimBlock | CUDA grid/block |
d now contains the sum. (i.e. result is stored in place) Definition at line 769 of file cumatrices.cu.
References dimBlock, dimGrid, and Kernels::Mixed_Sumto().
| void cuReal_convert | ( | float * | a, |
| double * | b, | ||
| const unsigned int | len, | ||
| const bool | dtof, | ||
| dim3 | dimBlock, | ||
| dim3 | dimGrid ) |
takes an array of real-valued float and double precision numbers and converts the precision
| [in,out] | a | Float array |
| [in,out] | b | Double array |
| [in] | len | Number of elements to convert |
| [in] | dtof | If true, convert double to float. Otherwise convert float to double |
| [in] | dimGrid,dimBlock | CUDA grid/block size |
dtof, either the contents of a or b are overwritten with those of the other array in the opposite precision. Definition at line 280 of file cusu2hmc.cu.
References dimBlock, dimGrid, and Kernels::Real_convert().
| double cureduce_sum_d | ( | double * | input, |
| const unsigned int | n, | ||
| const unsigned short | stream ) |
Sum all terms in an array of doubles.
| [in] | input | Input array |
| [in] | n | Number of terms |
| [in] | stream | What stream to use (useful for simultaneous reductions) |
Definition at line 587 of file cumatrices.cu.
References Kernels::reduce_sum(), and streams.
| float cureduce_sum_f | ( | float * | input, |
| const unsigned int | n, | ||
| const unsigned short | stream ) |
| void cuReunitarise | ( | Complex * | ut[2], |
| dim3 | dimGrid, | ||
| dim3 | dimBlock ) |
Reunitarises u11t and u12t as in conj(u11t[i])*u11t[i]+conj(u12t[i])*u12t[i]=1.
If you're looking at the FORTRAN code be careful. There are two header files for the /trial/ header. One with u11 u12 (which was included here originally) and the other with u11t and u12t.
| [in,out] | ut | Trial fields to be reunitarised |
| [in] | dimGrid,dimBlock | CUDA grid/block size |
ut replaced with reunitarised gauge fields Definition at line 294 of file cusu2hmc.cu.
References Complex, cudaDeviceSynchronise, Kernels::cuReunitarise(), dimBlock, and dimGrid.
| __global__ void Kernels::cuReunitarise | ( | complex< T > * | u11t, |
| complex< T > * | u12t ) |
Reunitarises u11t and u12t as in conj(u11t[i])*u11t[i]+conj(u12t[i])*u12t[i]=1.
If you're looking at the FORTRAN code be careful. There are two header files for the /trial/ header. One with u11 u12 (which was included here originally) and the other with u11t and u12t.
| [in,out] | u11t,u12t | Trial fields to be reunitarised |
u11t and u12t replaced with reunitarised gauge fields Definition at line 129 of file cusu2hmc.cu.
References conj(), kvol, and ndim.
| void cuTranspose_c | ( | Complex_f * | out, |
| const int | fast_in, | ||
| const int | fast_out, | ||
| const dim3 | dimGrid, | ||
| const dim3 | dimBlock ) |
In place transpose used to convert from AoS to SoA memory layout.
| [in,out] | out | The array being transposed |
| [in] | fast_in | The old outermost/fastest index |
| [in] | fast_out | The new outermost/fastest index |
| [in] | dimGrid | CUDA grid layout |
| [in] | dimBlock | CUDA block layout |
out with transposed array Definition at line 732 of file cumatrices.cu.
References Complex_f, cudaDeviceSynchronise, dimBlock, dimGrid, and Kernels::Transpose().
| void cuTranspose_d | ( | double * | out, |
| const int | fast_in, | ||
| const int | fast_out, | ||
| const dim3 | dimGrid, | ||
| const dim3 | dimBlock ) |
In place transpose used to convert from AoS to SoA memory layout.
| [in,out] | out | The array being transposed |
| [in] | fast_in | The old outermost/fastest index |
| [in] | fast_out | The new outermost/fastest index |
| [in] | dimGrid | CUDA grid layout |
| [in] | dimBlock | CUDA block layout |
out with transposed array Definition at line 740 of file cumatrices.cu.
References dimBlock, dimGrid, and Kernels::Transpose().
| void cuTranspose_f | ( | float * | out, |
| const int | fast_in, | ||
| const int | fast_out, | ||
| const dim3 | dimGrid, | ||
| const dim3 | dimBlock ) |
In place transpose used to convert from AoS to SoA memory layout.
| [in,out] | out | The array being transposed |
| [in] | fast_in | The old outermost/fastest index |
| [in] | fast_out | The new outermost/fastest index |
| [in] | dimGrid | CUDA grid layout |
| [in] | dimBlock | CUDA block layout |
out with transposed array Definition at line 747 of file cumatrices.cu.
References dimBlock, dimGrid, and Kernels::Transpose().
| void cuTranspose_I | ( | int * | out, |
| const int | fast_in, | ||
| const int | fast_out, | ||
| const dim3 | dimGrid, | ||
| const dim3 | dimBlock ) |
In place transpose used to convert from AoS to SoA memory layout.
| [in,out] | out | The array being transposed |
| [in] | fast_in | The old outermost/fastest index |
| [in] | fast_out | The new outermost/fastest index |
| [in] | dimGrid | CUDA grid layout |
| [in] | dimBlock | CUDA block layout |
out with transposed array Definition at line 754 of file cumatrices.cu.
References dimBlock, dimGrid, and Kernels::Transpose().
| void cuTranspose_U | ( | unsigned int * | out, |
| const int | fast_in, | ||
| const int | fast_out, | ||
| const dim3 | dimGrid, | ||
| const dim3 | dimBlock ) |
In place transpose used to convert from AoS to SoA memory layout.
| [in,out] | out | The array being transposed |
| [in] | fast_in | The old outermost/fastest index |
| [in] | fast_out | The new outermost/fastest index |
| [in] | dimGrid | CUDA grid layout |
| [in] | dimBlock | CUDA block layout |
out with transposed array Definition at line 761 of file cumatrices.cu.
References dimBlock, dimGrid, and Kernels::Transpose().
| void cuTranspose_z | ( | Complex * | out, |
| const int | fast_in, | ||
| const int | fast_out, | ||
| const dim3 | dimGrid, | ||
| const dim3 | dimBlock ) |
In place transpose used to convert from AoS to SoA memory layout.
| [in,out] | out | The array being transposed |
| [in] | fast_in | The old outermost/fastest index |
| [in] | fast_out | The new outermost/fastest index |
| [in] | dimGrid | CUDA grid layout |
| [in] | dimBlock | CUDA block layout |
out with transposed array Definition at line 725 of file cumatrices.cu.
References Complex, dimBlock, dimGrid, and Kernels::Transpose().
| void cuUpDownPart | ( | const unsigned int | na, |
| Complex * | X0, | ||
| Complex * | R1, | ||
| dim3 | dimBlock, | ||
| dim3 | dimGrid ) |
Up/Down partitioning of the pseudofermion field.
| [in] | na | Flavour index |
| [out] | X0 | Partitioned field |
| [in] | R1 | Full pseudofermion field |
| [in] | dimGrid,dimBlock | CUDA grid/block size |
X0 Definition at line 291 of file cusu2hmc.cu.
References Complex, Kernels::cuUpDownPart(), dimBlock, and dimGrid.
Up/Down partitioning of the pseudofermion field.
| [in] | na | Flavour index |
| [out] | X0 | Partitioned field |
| [in] | R1 | Full pseudofermion field |
X0 Definition at line 101 of file cusu2hmc.cu.
References Complex, kvol, nc, and ndirac.
Copies necessary (2*4*kvol) elements of Phi into a vector variable.
| [in] | na | flavour index |
| [out] | smallPhi | The partitioned output |
| [in] | Phi | The pseudofermion field |
smallPhi Definition at line 311 of file su2hmc.c.
References Complex, cuFill_Small_Phi(), dimBlock, dimGrid, kvol, nc, ndirac, and ngorkov.
| __global__ void Kernels::Gather | ( | T * | x, |
| T * | y, | ||
| const unsigned int | n, | ||
| unsigned int * | table, | ||
| const unsigned short | mu ) |
Extracts all the single precision gauge links in the \(\mu\) direction only.
| [out] | x | The output |
| [in] | y | The gauge field for a particular colour |
| [in] | n | Number of sites in the gauge field. This is typically kvol |
| [in] | table | Table containing information on nearest neighbours. Usually id or iu |
| [in] | mu | Direction we're interested in extracting |
Definition at line 116 of file cuforce.cu.
References kvol, and kvolHalo.
| int Init | ( | const int | istart, |
| const int | ibound, | ||
| const int | iread, | ||
| const float | beta, | ||
| const float | fmu, | ||
| const float | akappa, | ||
| const Complex_f | ajq, | ||
| const float | c_sw, | ||
| Complex * | u[2], | ||
| Complex * | ut[2], | ||
| Complex_f * | ut_f[2], | ||
| Complex | gamval[20], | ||
| Complex_f | gamval_f[20], | ||
| unsigned short | gamin[16], | ||
| double * | dk[2], | ||
| float * | dk_f[2], | ||
| unsigned int * | iu, | ||
| unsigned int * | id ) |
Initialises the system.
| [in] | istart | Zero for cold, >1 for hot, <1 for none |
| [in] | ibound | Periodic boundary conditions |
| [in] | iread | Read configuration from file |
| [in] | beta | Inverse gauge coupling |
| [in] | fmu | Chemical potential |
| [in] | akappa | Hopping parameter |
| [in] | ajq | Diquark source |
| [in] | c_sw | Clover coefficient |
| [out] | u | Gauge fields |
| [out] | ut,ut_f | Double/float Trial gauge field |
| [out] | dk,dk_f | \(\left(1+\gamma_0\right)e^{-\mu}\) and \(\left(1-\gamma_0\right)^\mu\) |
| [out] | iu,id | Up halo indices |
| [out] | gamval,gamval_f | Double/float precision gamma matrices rescaled by kappa |
| [out] | gamin | Gamma matrix indices |
Definition at line 10 of file su2hmc.c.
References Addrc(), AVX, Check_addr(), Complex, Complex_f, cuComplex_convert(), cuReal_convert(), DHalo_swap_dir(), dimBlock, dimBlockOne, dimGrid, dimGridOne, halo, I, ksize, ksizet, kvol, kvol3, kvolHalo, ndim, NOINIT, npt, nthreads, Par_ranset(), Par_sread(), pcoord, rank, ranlux_instd, Reunitarise(), seed, and UP.
| void Init_CUDA | ( | Complex * | u11t, |
| Complex * | u12t, | ||
| Complex | gamval[20], | ||
| Complex_f | gamval_f[20], | ||
| unsigned short | gamin[16], | ||
| double * | dk4m, | ||
| double * | dk4p, | ||
| unsigned int * | iu, | ||
| unsigned int * | id ) |
Initialise CUDA cuInit was taken already by CUDA (unsurprisingly).
| [in] | u11t,u12t | Trial gauge fields |
| [in] | gamval,gamval_f | Double/float precision gamma matrices rescaled by kappa |
| [in] | gamin | Gamma matrix indices |
| [in] | dk4m,dk4p | \(e^{-\mu}\) and \(e^\mu\) |
| [in] | iu,id | Up/lower halo indices |
Definition at line 248 of file cusu2hmc.cu.
References Complex, Complex_f, nadj, ndim, ndirac, and streams.
| __global__ void Kernels::Mixed_Sumto | ( | double * | d, |
| float * | f, | ||
| const unsigned int | n ) |
Sums a float array into a double array.
| [out] | d | The double array |
| [in] | f | The float array |
| [in] | n | The size of the arrays |
Definition at line 520 of file cumatrices.cu.
Allocates double precision memory needed for Congradp. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc.
| [out] | p | Holder for fermion field during inversion |
| [out] | r | Residue vector for conjugate gradient |
| [out] | x1,x2 | \(M\) and \(M^\dagger M\) |
| [out] | clover | Clover Fields |
Definition at line 140 of file congrad.c.
References AVX, Complex, cudaDeviceSynchronise, kferm, kfermHalo, kvol, and streams.
| void P_allocate_f | ( | Complex_f ** | p_f, |
| Complex_f ** | r_f, | ||
| Complex_f ** | x1_f, | ||
| Complex_f ** | x2_f, | ||
| Complex_f ** | xi_f ) |
Allocates memory needed for Congradp. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc.
| [out] | p_f | Holder for fermion field during inversion |
| [out] | r_f | Residue vector for conjugate gradient |
| [out] | x1_f,x2_f | \(M\) and \(M^\dagger M\) |
| [out] | xi_f | Accumulator array for conjugate gradient |
Definition at line 103 of file congrad.c.
References AVX, Complex_f, cudaDeviceSynchronise, kferm, and kfermHalo.
Frees memory needed for Congradp. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc.
| [in,out] | p | Holder for fermion field during inversion |
| [in,out] | x1,x2 | \(M\) and \(M^\dagger M\) |
| [in,out] | r | Residue vector for conjugate gradient |
| [in,out] | clover | Clover fields |
Definition at line 263 of file congrad.c.
References Complex, and streams.
| void P_free_f | ( | Complex_f ** | p_f, |
| Complex_f ** | r_f, | ||
| Complex_f ** | x1_f, | ||
| Complex_f ** | x2_f, | ||
| Complex_f ** | xi_f ) |
Frees memory needed for Congradp. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc.
| [in,out] | p_f | Holder for fermion field during inversion |
| [in,out] | r_f | Residue vector for conjugate gradient |
| [in,out] | x1_f,x2_f | \(M\) and \(M^\dagger M\) |
| [in,out] | xi_f | Conjugate gradient accumulator |
Definition at line 243 of file congrad.c.
References Complex_f.
Allocates double precision memory needed for Congradq. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc.
| [out] | p | Holder for fermion field during inversion |
| [out] | x1,x2 | \(M\) and \(M^\dagger M\) |
| [out] | clover | Clover Fields |
Definition at line 64 of file congrad.c.
References AVX, Complex, kferm2, kferm2Halo, kvol, and streams.
| void Q_allocate_f | ( | Complex_f ** | p_f, |
| Complex_f ** | x1_f, | ||
| Complex_f ** | x2_f, | ||
| Complex_f ** | r_f, | ||
| Complex_f ** | X1_f ) |
Allocates memory needed for Congradq. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc.
| [out] | p_f | Holder for fermion field during inversion |
| [out] | x1_f,x2_f | \(M\) and \(M^\dagger M\) |
| [out] | r_f | Residue vector for conjugate gradient |
| [out] | X1_f | Pseudofermion field |
Definition at line 23 of file congrad.c.
References AVX, Complex_f, kferm2, kferm2Halo, and streams.
Frees double precision memory needed for Congradq. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc.
| [in,out] | p | Holder for fermion field during inversion |
| [in,out] | x1,x2 | \(M\) and \(M^\dagger M\) |
| [in,out] | clover | clover fields |
Definition at line 211 of file congrad.c.
References Complex, cudaDeviceSynchronise, and streams.
| void Q_free_f | ( | Complex_f ** | p_f, |
| Complex_f ** | x1_f, | ||
| Complex_f ** | x2_f, | ||
| Complex_f ** | r_f, | ||
| Complex_f ** | X1_f ) |
Frees memory needed for Congradq. Just to improve readability Note that since C does not modify it's arguments, you need to pass a pointer to the pointer you want to assign the memory to. This is similar behaviour to cudaMalloc.
| [in,out] | p_f | Holder for fermion field during inversion |
| [in,out] | x1_f,x2_f | \(M\) and \(M^\dagger M\) |
| [in,out] | r_f | Residue vector for conjugate gradient |
| [in,out] | X1_f | Pseudofermion field |
Definition at line 181 of file congrad.c.
References Complex_f, cudaDeviceSynchronise, and streams.
| __global__ void Kernels::Real_convert | ( | float * | a, |
| double * | b, | ||
| const unsigned int | len, | ||
| const bool | dtof ) |
takes an array of real float and double precision numbers and converts the precision
| [in,out] | a | Float array |
| [in,out] | b | Double array |
| [in] | len | Number of elements to convert |
| [in] | dtof | If true, convert double to float. Otherwise convert float to double |
dtof, either the contents of a or b are overwritten with those of the other array in the opposite precision. Definition at line 50 of file cusu2hmc.cu.
| __global__ void Kernels::reduce_sum | ( | T * | g_in_data, |
| T * | g_out_data, | ||
| const unsigned int | n ) |
Performs a block reduction for sum.
| [in] | g_in_data | The input global data array |
| [out] | g_out_data | The output global data array |
| [in] | n | The size of the input array |
g_out_data Definition at line 543 of file cumatrices.cu.
|
inline |
Reunitarises u11t and u12t as in conj(u11t[i])*u11t[i]+conj(u12t[i])*u12t[i]=1.
If you're looking at the FORTRAN code be careful. There are two header files for the /trial/ header. One with u11 u12 (which was included here originally) and the other with u11t and u12t.
| [in,out] | ut | Trial fields to be reunitarised |
ut replaced with reunitarised gauge fields Definition at line 342 of file su2hmc.c.
References Complex, conj(), cuReunitarise(), dimBlock, dimGrid, kvol, kvolHalo, and ndim.
| __global__ void Kernels::Transpose | ( | T * | out, |
| const T * | in, | ||
| const int | fast_in, | ||
| const int | fast_out ) |
Swaps the order of the gauge field so that it is now SoA instead of AoS and it is nice and coalesced in memory.
| [out] | out | The flipped array |
| [in] | in | The original array |
| [in] | fast_out | The size of the slowest moving dimension. This is the lattice site when read in from disk |
| [in] | fast_in | The size of the fastest moving dimension. This is the direction index when read in from disk. |
Definition at line 490 of file cumatrices.cu.
|
inline |
In place transpose used to convert from AoS to SoA memory layout.
| [in,out] | out | The array being transposed |
| [in] | fast_in | The old outermost/fastest index |
| [in] | fast_out | The new outermost/fastest index |
out with transposed array Definition at line 836 of file matrices.c.
References AVX, Complex_f, cuTranspose_c(), dimBlock, and dimGrid.
|
inline |
In place transpose used to convert from AoS to SoA memory layout.
| [in,out] | out | The array being transposed |
| [in] | fast_in | The old outermost/fastest index |
| [in] | fast_out | The new outermost/fastest index |
out with transposed array Definition at line 905 of file matrices.c.
References AVX, cuTranspose_d(), dimBlock, and dimGrid.
|
inline |
In place transpose used to convert from AoS to SoA memory layout.
| [in,out] | out | The array being transposed |
| [in] | fast_in | The old outermost/fastest index |
| [in] | fast_out | The new outermost/fastest index |
out with transposed array Definition at line 882 of file matrices.c.
References AVX, cuTranspose_f(), dimBlock, and dimGrid.
|
inline |
In place transpose used to convert from AoS to SoA memory layout.
| [in,out] | out | The array being transposed |
| [in] | fast_in | The old outermost/fastest index |
| [in] | fast_out | The new outermost/fastest index |
out with transposed array Definition at line 928 of file matrices.c.
References AVX, cuTranspose_I(), dimBlock, and dimGrid.
|
inline |
In place transpose used to convert from AoS to SoA memory layout.
| [in,out] | out | The array being transposed |
| [in] | fast_in | The old outermost/fastest index |
| [in] | fast_out | The new outermost/fastest index |
out with transposed array Definition at line 951 of file matrices.c.
References AVX, cuTranspose_U(), dimBlock, and dimGrid.
|
inline |
In place transpose used to convert from AoS to SoA memory layout.
| [in,out] | out | The array being transposed |
| [in] | fast_in | The old outermost/fastest index |
| [in] | fast_out | The new outermost/fastest index |
out with transposed array Definition at line 859 of file matrices.c.
References AVX, Complex, cuTranspose_z(), dimBlock, and dimGrid.
Up/Down partitioning of the pseudofermion field.
| [in] | na | Flavour index |
| [out] | X0 | Partitioned field |
| [in] | R1 | Full pseudofermion field |
X0 Definition at line 327 of file su2hmc.c.
References Complex, cudaDeviceSynchronise, cuUpDownPart(), dimBlock, dimGrid, kvol, nc, and ndirac.
| __device__ void Device::warpReduce_sum | ( | volatile T * | sdata, |
| const unsigned int | tid ) |
Performs a warp reduction for sum.
| [in,out] | sdata | The shared data array |
| [in] | tid | The thread ID |
sdata Definition at line 21 of file cumatrices.cu.
Extracts all the double precision gauge links in the \(\mu\) direction only.
| [out] | x | The output |
| [in] | y | The gauge field for a particular colour |
| [in] | n | Number of sites in the gauge field. This is typically kvol |
| [in] | table | Table containing information on nearest neighbours. Usually id or iu |
| [in] | mu | Direciton we're interested in extracting |
x replaced with output Definition at line 301 of file su2hmc.c.