su2hmc
Loading...
Searching...
No Matches
matrices.h
Go to the documentation of this file.
1
8#pragma once
9#include <par_mpi.h>
10#if (defined __cplusplus)
11extern "C"
12{
13#endif
31 int Dslash(Complex *phi, Complex *r, Complex *ut[nc],unsigned int *iu,unsigned int *id,\
32 Complex gamval[20], const unsigned short gamin[16], double *dk[nc], Complex_f jqq, float akappa);
50 int Dslashd(Complex *phi, Complex *r, Complex *ut[nc],unsigned int *iu,unsigned int *id,\
51 Complex gamval[20], const unsigned short gamin[16], double *dk[nc], Complex_f jqq, float akappa);
68 int Hdslash(Complex *phi, Complex *r, Complex *ut[nc],unsigned int *iu,unsigned int *id,\
69 Complex gamval[20], const unsigned short gamin[16], double *dk[nc], float akappa);
86 int Hdslashd(Complex *phi, Complex *r, Complex *ut[nc],unsigned int *iu,unsigned int *id,\
87 Complex gamval[20], const unsigned short gamin[16], double *dk[nc], float akappa);
88 //Float version
106 int Dslash_f(Complex_f *phi, Complex_f *r, Complex_f *ut[nc],unsigned int *iu,unsigned int *id,\
107 Complex_f gamval[20],const unsigned short gamin[16], float *dk[nc], Complex_f jqq, float akappa);
125 int Dslashd_f(Complex_f *phi, Complex_f *r, Complex_f *ut[nc],unsigned int *iu,unsigned int *id,\
126 Complex_f gamval[20],const unsigned short gamin[16], float *dk[nc], Complex_f jqq, float akappa);
143 int Hdslash_f(Complex_f *phi, Complex_f *r, Complex_f *ut[nc],unsigned int *iu,unsigned int *id,\
144 Complex_f gamval[20], const unsigned short gamin[16], float *dk[nc], float akappa);
161 int Hdslashd_f(Complex_f *phi, Complex_f *r, Complex_f *ut[nc],unsigned int *iu,unsigned int *id,\
162 Complex_f gamval[20],const unsigned short gamin[16], float *dk[nc], float akappa);
163
174 void Transpose_z(Complex *out, const int, const int);
185 void Transpose_c(Complex_f *out, const int, const int);
196 void Transpose_d(double *out, const int, const int);
207 void Transpose_f(float *out, const int, const int);
218 void Transpose_I(int *out, const int, const int);
229 void Transpose_U(unsigned int *out, const int, const int);
230
231#ifdef USE_GPU
232 //Calling Functions
250 void cuDslash(Complex *phi, Complex *r, Complex *ut[nc],unsigned int *iu,unsigned int *id,
251 Complex gamval[20], const unsigned short gamin[16], double *dk[nc], Complex_f jqq, float akappa,
252 dim3 dimGrid, dim3 dimBlock);
270 void cuDslashd(Complex *phi, Complex *r, Complex *ut[nc],unsigned int *iu,unsigned int *id,
271 Complex gamval[20], const unsigned short gamin[16], double *dk[nc], Complex_f jqq, float akappa,
272 dim3 dimGrid, dim3 dimBlock);
289 void cuHdslash(Complex *phi, Complex *r, Complex *ut[nc],unsigned int *iu,unsigned int *id,
290 Complex gamval[20], const unsigned short gamin[16], double *dk[nc], float akappa,dim3 dimGrid, dim3 dimBlock);
307 void cuHdslashd(Complex *phi, Complex *r, Complex *ut[nc],unsigned int *iu,unsigned int *id,
308 Complex gamval[20], const unsigned short gamin[16], double *dk[nc], float akappa, dim3 dimGrid, dim3 dimBlock);
309 //Float version
327 void cuDslash_f(Complex_f *phi, Complex_f *r, Complex_f *ut[nc],unsigned int *iu,unsigned int *id,\
328 Complex_f gamval[20], const unsigned short gamin[16], float *dk[nc], Complex_f jqq, float akappa,\
329 dim3 dimGrid, dim3 dimBlock);
347 void cuDslashd_f(Complex_f *phi, Complex_f *r, Complex_f *ut[nc],unsigned int *iu,unsigned int *id,\
348 Complex_f gamval[20],const unsigned short gamin[16], float *dk[nc], Complex_f jqq, float akappa,\
349 dim3 dimGrid, dim3 dimBlock);
366 void cuHdslash_f(Complex_f *phi, Complex_f *r, Complex_f *ut[nc],unsigned int *iu,unsigned int *id,\
367 Complex_f gamval[20],const unsigned short gamin[16], float *dk[nc], float akappa,dim3 dimGrid, dim3 dimBlock);
384 void cuHdslashd_f(Complex_f *phi, Complex_f *r, Complex_f *ut[nc],unsigned int *iu,unsigned int *id,\
385 Complex_f gamval[20],const unsigned short gamin[16], float *dk[nc], float akappa, dim3 dimGrid, dim3 dimBlock);
386
396 double cureduce_sum_d(double *input, const unsigned int n,const unsigned short stream);
406 float cureduce_sum_f(float *input, const unsigned int n,const unsigned short stream);
419 void cuTranspose_z(Complex *out, const int fast_in, const int fast_out, const dim3 dimGrid, const dim3 dimBlock);
432 void cuTranspose_c(Complex_f *out, const int fast_in, const int fast_out, const dim3 dimGrid, const dim3 dimBlock);
445 void cuTranspose_d(double *out, const int fast_in, const int fast_out, const dim3 dimGrid, const dim3 dimBlock);
458 void cuTranspose_f(float *out, const int fast_in, const int fast_out, const dim3 dimGrid, const dim3 dimBlock);
471 void cuTranspose_I(int *out, const int fast_in, const int fast_out, const dim3 dimGrid, const dim3 dimBlock);
484 void cuTranspose_U(unsigned int *out, const int fast_in, const int fast_out, const dim3 dimGrid, const dim3 dimBlock);
498 void cuMixed_Sumto(double *d, float *f,const unsigned int n,const dim3 dimGrid,const dim3 dimBlock);
499#endif
500#if (defined __cplusplus)
501}
502#endif
void cuDslash_f(Complex_f *phi, Complex_f *r, Complex_f *ut[nc], unsigned int *iu, unsigned int *id, Complex_f gamval[20], const unsigned short gamin[16], float *dk[nc], Complex_f jqq, float akappa, dim3 dimGrid, dim3 dimBlock)
GPU calling wrapper for in double precision.
int Dslash_f(Complex_f *phi, Complex_f *r, Complex_f *ut[nc], unsigned int *iu, unsigned int *id, Complex_f gamval[20], const unsigned short gamin[16], float *dk[nc], Complex_f jqq, float akappa)
Evaluates in single precision.
Definition matrices.c:425
void cuHdslashd_f(Complex_f *phi, Complex_f *r, Complex_f *ut[nc], unsigned int *iu, unsigned int *id, Complex_f gamval[20], const unsigned short gamin[16], float *dk[nc], float akappa, dim3 dimGrid, dim3 dimBlock)
GPU calling wrapper for in single precision.
int Dslashd_f(Complex_f *phi, Complex_f *r, Complex_f *ut[nc], unsigned int *iu, unsigned int *id, Complex_f gamval[20], const unsigned short gamin[16], float *dk[nc], Complex_f jqq, float akappa)
Evaluates in single precision.
Definition matrices.c:544
void cuDslashd_f(Complex_f *phi, Complex_f *r, Complex_f *ut[nc], unsigned int *iu, unsigned int *id, Complex_f gamval[20], const unsigned short gamin[16], float *dk[nc], Complex_f jqq, float akappa, dim3 dimGrid, dim3 dimBlock)
GPU calling wrapper for in double precision.
void cuHdslash_f(Complex_f *phi, Complex_f *r, Complex_f *ut[nc], unsigned int *iu, unsigned int *id, Complex_f gamval[20], const unsigned short gamin[16], float *dk[nc], float akappa, dim3 dimGrid, dim3 dimBlock)
GPU calling wrapper for in single precision.
int Hdslashd_f(Complex_f *phi, Complex_f *r, Complex_f *ut[nc], unsigned int *iu, unsigned int *id, Complex_f gamval[20], const unsigned short gamin[16], float *dk[nc], float akappa)
Evaluates in single precision.
Definition matrices.c:746
int Hdslashd(Complex *phi, Complex *r, Complex *ut[nc], unsigned int *iu, unsigned int *id, Complex gamval[20], const unsigned short gamin[16], double *dk[nc], float akappa)
Evaluates in double precision.
Definition matrices.c:338
void cuHdslashd(Complex *phi, Complex *r, Complex *ut[nc], unsigned int *iu, unsigned int *id, Complex gamval[20], const unsigned short gamin[16], double *dk[nc], float akappa, dim3 dimGrid, dim3 dimBlock)
GPU calling wrapper for in double precision.
void cuHdslash(Complex *phi, Complex *r, Complex *ut[nc], unsigned int *iu, unsigned int *id, Complex gamval[20], const unsigned short gamin[16], double *dk[nc], float akappa, dim3 dimGrid, dim3 dimBlock)
GPU calling wrapper for in double precision.
void cuDslash(Complex *phi, Complex *r, Complex *ut[nc], unsigned int *iu, unsigned int *id, Complex gamval[20], const unsigned short gamin[16], double *dk[nc], Complex_f jqq, float akappa, dim3 dimGrid, dim3 dimBlock)
GPU calling wrapper for in double precision.
int Hdslash(Complex *phi, Complex *r, Complex *ut[nc], unsigned int *iu, unsigned int *id, Complex gamval[20], const unsigned short gamin[16], double *dk[nc], float akappa)
Evaluates in double precision.
Definition matrices.c:254
int Dslashd(Complex *phi, Complex *r, Complex *ut[nc], unsigned int *iu, unsigned int *id, Complex gamval[20], const unsigned short gamin[16], double *dk[nc], Complex_f jqq, float akappa)
Evaluates in double precision.
Definition matrices.c:135
void cuDslashd(Complex *phi, Complex *r, Complex *ut[nc], unsigned int *iu, unsigned int *id, Complex gamval[20], const unsigned short gamin[16], double *dk[nc], Complex_f jqq, float akappa, dim3 dimGrid, dim3 dimBlock)
GPU calling wrapper for in double precision.
int Hdslash_f(Complex_f *phi, Complex_f *r, Complex_f *ut[nc], unsigned int *iu, unsigned int *id, Complex_f gamval[20], const unsigned short gamin[16], float *dk[nc], float akappa)
Evaluates in single precision.
Definition matrices.c:663
int Dslash(Complex *phi, Complex *r, Complex *ut[nc], unsigned int *iu, unsigned int *id, Complex gamval[20], const unsigned short gamin[16], double *dk[nc], Complex_f jqq, float akappa)
Evaluates in double precision.
Definition matrices.c:16
float cureduce_sum_f(float *input, const unsigned int n, const unsigned short stream)
Sum all terms in an array of floats.
void Transpose_c(Complex_f *out, const int, const int)
In place transpose used to convert from AoS to SoA memory layout.
Definition matrices.c:836
void Transpose_U(unsigned int *out, const int, const int)
In place transpose used to convert from AoS to SoA memory layout.
Definition matrices.c:951
double cureduce_sum_d(double *input, const unsigned int n, const unsigned short stream)
Sum all terms in an array of doubles.
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_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_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 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 Transpose_f(float *out, const int, const int)
In place transpose used to convert from AoS to SoA memory layout.
Definition matrices.c:882
void Transpose_z(Complex *out, const int, const int)
In place transpose used to convert from AoS to SoA memory layout.
Definition matrices.c:859
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 Transpose_d(double *out, const int, const int)
In place transpose used to convert from AoS to SoA memory layout.
Definition matrices.c:905
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 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,...
void Transpose_I(int *out, const int, const int)
In place transpose used to convert from AoS to SoA memory layout.
Definition matrices.c:928
MPI headers.
#define nc
Colours.
Definition sizes.h:182
#define Complex
Double precision complex number.
Definition sizes.h:64
#define Complex_f
Single precision complex number.
Definition sizes.h:62
dim3 dimGrid
Default grid size. First component is normally nt. Second and third depend whatever is needed to get ...
Definition cusu2hmc.cu:27
dim3 dimBlock
Default block size. Usually 128.
Definition cusu2hmc.cu:25