QUDA  v1.1.0
A library for QCD on GPUs
dslash_coarse.cu
Go to the documentation of this file.
1 #include <dslash_coarse.hpp>
2 
3 namespace quda {
4 
5  // declaration for dagger wrapper - defined in dslash_coarse_dagger.cu
6  void ApplyCoarseDagger(ColorSpinorField &out, const ColorSpinorField &inA, const ColorSpinorField &inB,
7  const GaugeField &Y, const GaugeField &X, double kappa, int parity,
8  bool dslash, bool clover, const int *commDim, QudaPrecision halo_precision);
9 
10  // dagger = false wrapper
11  void ApplyCoarse(ColorSpinorField &out, const ColorSpinorField &inA, const ColorSpinorField &inB,
12  const GaugeField &Y, const GaugeField &X, double kappa, int parity,
13  bool dslash, bool clover, const int *commDim, QudaPrecision halo_precision)
14  {
15  constexpr bool dagger = false;
16  DslashCoarseLaunch<dagger> Dslash(out, inA, inB, Y, X, kappa, parity, dslash,
17  clover, commDim, halo_precision);
18 
19  DslashCoarsePolicyTune<decltype(Dslash)> policy(Dslash);
20  policy.apply(0);
21  } //ApplyCoarse
22 
23  //Apply the coarse Dirac matrix to a coarse grid vector
24  //out(x) = M*in = X*in - kappa*\sum_mu Y_{-\mu}(x)in(x+mu) + Y^\dagger_mu(x-mu)in(x-mu)
25  // or
26  //out(x) = M^dagger*in = X^dagger*in - kappa*\sum_mu Y^\dagger_{-\mu}(x)in(x+mu) + Y_mu(x-mu)in(x-mu)
27  //Uses the kappa normalization for the Wilson operator.
28  void ApplyCoarse(ColorSpinorField &out, const ColorSpinorField &inA, const ColorSpinorField &inB,
29  const GaugeField &Y, const GaugeField &X, double kappa, int parity,
30  bool dslash, bool clover, bool dagger, const int *commDim, QudaPrecision halo_precision) {
31 
32  if (dagger)
33  ApplyCoarseDagger(out, inA, inB, Y, X, kappa, parity, dslash, clover, commDim, halo_precision);
34  else
35  ApplyCoarse(out, inA, inB, Y, X, kappa, parity, dslash, clover, commDim, halo_precision);
36 
37  } //ApplyCoarse
38 
39 } // namespace quda