QUDA  0.9.0
dslash_quda.h
Go to the documentation of this file.
1 #ifndef _DSLASH_QUDA_H
2 #define _DSLASH_QUDA_H
3 
4 #include <quda_internal.h>
5 #include <tune_quda.h>
6 #include <gauge_field.h>
7 
8 #include <worker.h>
9 
10 namespace quda {
11 
15  void setKernelPackT(bool pack);
16 
20  bool getKernelPackT();
21 
25  void setPackComms(const int *commDim);
26 
27  bool getDslashLaunch();
28 
29  void createDslashEvents();
30  void destroyDslashEvents();
31 
32 
33  // plain Wilson Dslash
34  void wilsonDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &gauge, const cudaColorSpinorField *in,
35  const int oddBit, const int daggerBit, const cudaColorSpinorField *x,
36  const double &k, const int *commDim, TimeProfile &profile);
37 
38  // clover Dslash
39  void cloverDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &gauge,
40  const FullClover &cloverInv, const cudaColorSpinorField *in,
41  const int oddBit, const int daggerBit, const cudaColorSpinorField *x,
42  const double &k, const int *commDim, TimeProfile &profile);
43 
44  // clover Dslash
45  void asymCloverDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &gauge,
46  const FullClover &cloverInv, const cudaColorSpinorField *in,
47  const int oddBit, const int daggerBit, const cudaColorSpinorField *x,
48  const double &k, const int *commDim, TimeProfile &profile);
49 
58  void ApplyClover(ColorSpinorField &out, const ColorSpinorField &in,
59  const CloverField &clover, bool inverse, int parity);
60 
61  // domain wall Dslash
62  void domainWallDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &gauge, const cudaColorSpinorField *in,
63  const int parity, const int dagger, const cudaColorSpinorField *x,
64  const double &m_f, const double &k, const int *commDim, TimeProfile &profile);
65 
66  // Added for 4d EO preconditioning in DWF
67  void domainWallDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &gauge, const cudaColorSpinorField *in,
68  const int parity, const int dagger, const cudaColorSpinorField *x,
69  const double &m_f, const double &a, const double &b,
70  const int *commDim, const int DS_type, TimeProfile &profile);
71 
72  // Added for 4d EO preconditioning in Mobius DWF
73  void MDWFDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &gauge, const cudaColorSpinorField *in,
74  const int parity, const int dagger, const cudaColorSpinorField *x, const double &m_f, const double &k,
75  const double *b5, const double *c_5, const double &m5,
76  const int *commDim, const int DS_type, TimeProfile &profile);
77 
78  // staggered Dslash
79  void staggeredDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &gauge,
80  const cudaColorSpinorField *in, const int parity, const int dagger,
81  const cudaColorSpinorField *x, const double &k,
82  const int *commDim, TimeProfile &profile);
83 
84  // improved staggered Dslash
85  void improvedStaggeredDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &fatGauge, const cudaGaugeField &longGauge,
86  const cudaColorSpinorField *in, const int parity, const int dagger,
87  const cudaColorSpinorField *x, const double &k,
88  const int *commDim, TimeProfile &profile);
89 
90  // twisted mass Dslash
91  void twistedMassDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &gauge, const cudaColorSpinorField *in,
92  const int parity, const int dagger, const cudaColorSpinorField *x, const QudaTwistDslashType type,
93  const double &kappa, const double &mu, const double &epsilon, const double &k, const int *commDim, TimeProfile &profile);
94 
95  // twisted mass Dslash
96  void ndegTwistedMassDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &gauge, const cudaColorSpinorField *in,
97  const int parity, const int dagger, const cudaColorSpinorField *x, const QudaTwistDslashType type,
98  const double &kappa, const double &mu, const double &epsilon, const double &k, const int *commDim,
99  TimeProfile &profile);
100 
101  // twisted clover Dslash
102  void twistedCloverDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &gauge,
103  const FullClover *clover, const FullClover *cloverInv, const cudaColorSpinorField *in,
104  const int parity, const int dagger, const cudaColorSpinorField *x, const QudaTwistCloverDslashType type,
105  const double &kappa, const double &mu, const double &epsilon, const double &k, const int *commDim,
106  TimeProfile &profile);
107 
119  void ApplyTwistGamma(ColorSpinorField &out, const ColorSpinorField &in, int d, double kappa, double mu,
120  double epsilon, int dagger, QudaTwistGamma5Type type);
121 
136  void ApplyTwistClover(ColorSpinorField &out, const ColorSpinorField &in, const CloverField &clover,
137  double kappa, double mu, double epsilon, int parity, int dagger, QudaTwistGamma5Type twist);
138 
139 
154  void packFace(void *ghost_buf[2*QUDA_MAX_DIM], cudaColorSpinorField &in, MemoryLocation location,
155  const int nFace, const int dagger, const int parity, const int dim, const int face_num,
156  const cudaStream_t &stream, const double a=0.0, const double b=0.0);
157 
158  void packFaceExtended(void *ghost_buf[2*QUDA_MAX_DIM], cudaColorSpinorField &field, MemoryLocation location,
159  const int nFace, const int R[], const int dagger, const int parity, const int dim,
160  const int face_num, const cudaStream_t &stream, const bool unpack=false);
161 
167  void gamma5(ColorSpinorField &out, const ColorSpinorField &in);
168 
169 }
170 
171 #endif // _DSLASH_QUDA_H
double mu
Definition: test_util.cpp:1643
bool getKernelPackT()
Definition: dslash_quda.cu:61
void setPackComms(const int *commDim)
Definition: dslash_pack.cu:41
enum QudaTwistCloverDslashType_s QudaTwistCloverDslashType
void wilsonDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &gauge, const cudaColorSpinorField *in, const int oddBit, const int daggerBit, const cudaColorSpinorField *x, const double &k, const int *commDim, TimeProfile &profile)
void MDWFDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &gauge, const cudaColorSpinorField *in, const int parity, const int dagger, const cudaColorSpinorField *x, const double &m_f, const double &k, const double *b5, const double *c_5, const double &m5, const int *commDim, const int DS_type, TimeProfile &profile)
cudaStream_t * stream
static __inline__ dim3 dim3 void size_t cudaStream_t int dim
void twistedCloverDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &gauge, const FullClover *clover, const FullClover *cloverInv, const cudaColorSpinorField *in, const int parity, const int dagger, const cudaColorSpinorField *x, const QudaTwistCloverDslashType type, const double &kappa, const double &mu, const double &epsilon, const double &k, const int *commDim, TimeProfile &profile)
#define m5
static int R[4]
void packFaceExtended(void *ghost_buf[2 *QUDA_MAX_DIM], cudaColorSpinorField &field, MemoryLocation location, const int nFace, const int R[], const int dagger, const int parity, const int dim, const int face_num, const cudaStream_t &stream, const bool unpack=false)
void cloverDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &gauge, const FullClover &cloverInv, const cudaColorSpinorField *in, const int oddBit, const int daggerBit, const cudaColorSpinorField *x, const double &k, const int *commDim, TimeProfile &profile)
#define b
void packFace(void *ghost_buf[2 *QUDA_MAX_DIM], cudaColorSpinorField &in, MemoryLocation location, const int nFace, const int dagger, const int parity, const int dim, const int face_num, const cudaStream_t &stream, const double a=0.0, const double b=0.0)
Dslash face packing routine.
bool getDslashLaunch()
VOLATILE spinorFloat kappa
void ApplyTwistGamma(ColorSpinorField &out, const ColorSpinorField &in, int d, double kappa, double mu, double epsilon, int dagger, QudaTwistGamma5Type type)
Apply the twisted-mass gamma operator to a color-spinor field.
Definition: dslash_quda.cu:384
void staggeredDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &gauge, const cudaColorSpinorField *in, const int parity, const int dagger, const cudaColorSpinorField *x, const double &k, const int *commDim, TimeProfile &profile)
void asymCloverDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &gauge, const FullClover &cloverInv, const cudaColorSpinorField *in, const int oddBit, const int daggerBit, const cudaColorSpinorField *x, const double &k, const int *commDim, TimeProfile &profile)
cpuColorSpinorField * in
void createDslashEvents()
Definition: dslash_quda.cu:86
int commDim(int)
enum QudaTwistDslashType_s QudaTwistDslashType
void improvedStaggeredDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &fatGauge, const cudaGaugeField &longGauge, const cudaColorSpinorField *in, const int parity, const int dagger, const cudaColorSpinorField *x, const double &k, const int *commDim, TimeProfile &profile)
cpuColorSpinorField * out
void ApplyClover(ColorSpinorField &out, const ColorSpinorField &in, const CloverField &clover, bool inverse, int parity)
Apply clover-matrix field to a color-spinor field.
Definition: dslash_quda.cu:557
void ndegTwistedMassDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &gauge, const cudaColorSpinorField *in, const int parity, const int dagger, const cudaColorSpinorField *x, const QudaTwistDslashType type, const double &kappa, const double &mu, const double &epsilon, const double &k, const int *commDim, TimeProfile &profile)
void domainWallDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &gauge, const cudaColorSpinorField *in, const int parity, const int dagger, const cudaColorSpinorField *x, const double &m_f, const double &k, const int *commDim, TimeProfile &profile)
void twistedMassDslashCuda(cudaColorSpinorField *out, const cudaGaugeField &gauge, const cudaColorSpinorField *in, const int parity, const int dagger, const cudaColorSpinorField *x, const QudaTwistDslashType type, const double &kappa, const double &mu, const double &epsilon, const double &k, const int *commDim, TimeProfile &profile)
void setKernelPackT(bool pack)
Definition: dslash_quda.cu:59
void gamma5(ColorSpinorField &out, const ColorSpinorField &in)
Applies a gamma5 matrix to a spinor (wrapper to ApplyGamma)
Definition: dslash_quda.cu:427
const int face_num
enum QudaTwistGamma5Type_s QudaTwistGamma5Type
#define QUDA_MAX_DIM
Maximum number of dimensions supported by QUDA. In practice, no routines make use of more than 5...
static __inline__ size_t size_t d
QudaParity parity
Definition: covdev_test.cpp:53
void destroyDslashEvents()
Definition: dslash_quda.cu:118
#define a
void ApplyTwistClover(ColorSpinorField &out, const ColorSpinorField &in, const CloverField &clover, double kappa, double mu, double epsilon, int parity, int dagger, QudaTwistGamma5Type twist)
Apply twisted clover-matrix field to a color-spinor field.
Definition: dslash_quda.cu:708