1 #include <dslash_coarse.hpp>
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);
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)
15 constexpr bool dagger = false;
16 DslashCoarseLaunch<dagger> Dslash(out, inA, inB, Y, X, kappa, parity, dslash,
17 clover, commDim, halo_precision);
19 DslashCoarsePolicyTune<decltype(Dslash)> policy(Dslash);
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)
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) {
33 ApplyCoarseDagger(out, inA, inB, Y, X, kappa, parity, dslash, clover, commDim, halo_precision);
35 ApplyCoarse(out, inA, inB, Y, X, kappa, parity, dslash, clover, commDim, halo_precision);