21 template <
typename Float,
int nDim,
int nColor,
int nParity,
bool dagger,
bool xpay, KernelType kernel_type,
typename Arg>
23 static constexpr
const char *
kernel =
"quda::wilsonCloverGPU";
24 template <
typename Dslash>
27 static_assert(
xpay ==
true,
"wilsonClover operator only defined for xpay");
28 dslash.
launch(wilsonCloverGPU<Float, nDim, nColor, nParity, dagger, xpay, kernel_type, Arg>, tp, arg, stream);
32 template <
typename Float,
int nDim,
int nColor,
typename Arg>
class WilsonClover :
public Dslash<Float>
41 Dslash<Float>(arg, out, in,
"kernels/dslash_wilson_clover.cuh"),
56 errorQuda(
"Wilson-clover operator only defined for xpay=true");
61 int clover_flops = 504;
63 switch (arg.kernel_type) {
78 int clover_bytes = 72 * in.
Precision() + (isFixed ? 2 *
sizeof(float) : 0);
81 switch (arg.kernel_type) {
105 constexpr
int nDim = 4;
106 WilsonCloverArg<Float, nColor, recon> arg(out, in, U, A, a, 0.0, x, parity, dagger, comm_override);
110 const_cast<cudaColorSpinorField *>(static_cast<const cudaColorSpinorField *>(&in)), in.
VolumeCB(),
124 #ifdef GPU_CLOVER_DIRAC 125 if (in.
V() == out.
V())
errorQuda(
"Aliasing pointers");
135 instantiate<WilsonCloverApply>(
out,
in, U, A, a, x,
parity,
dagger, comm_override, profile);
137 errorQuda(
"Clover dslash has not been built");
void launch(T *f, const TuneParam &tp, Arg &arg, const cudaStream_t &stream)
void apply(const cudaStream_t &stream)
QudaVerbosity getVerbosity()
#define checkPrecision(...)
void apply(const cudaStream_t &stream)
const char * VolString() const
This is a helper class that is used to instantiate the correct templated kernel for the dslash...
static void launch(Dslash &dslash, TuneParam &tp, Arg &arg, const cudaStream_t &stream)
void xpay(ColorSpinorField &x, double a, ColorSpinorField &y)
const ColorSpinorField & in
WilsonClover(Arg &arg, const ColorSpinorField &out, const ColorSpinorField &in)
virtual long long bytes() const
static constexpr const char * kernel
__device__ __host__ void wilson(Arg &arg, int idx, int s, int parity)
const int * GhostFaceCB() const
TuneParam & tuneLaunch(Tunable &tunable, QudaTune enabled, QudaVerbosity verbosity)
#define checkLocation(...)
cpuColorSpinorField * out
void ApplyWilsonClover(ColorSpinorField &out, const ColorSpinorField &in, const GaugeField &U, const CloverField &A, double kappa, const ColorSpinorField &x, int parity, bool dagger, const int *comm_override, TimeProfile &profile)
Driver for applying the Wilson-clover stencil.
WilsonCloverApply(ColorSpinorField &out, const ColorSpinorField &in, const GaugeField &U, const CloverField &A, double a, const ColorSpinorField &x, int parity, bool dagger, const int *comm_override, TimeProfile &profile)
__host__ __device__ ValueType arg(const complex< ValueType > &z)
Returns the phase angle of z.
virtual long long flops() const
QudaTune getTuning()
Query whether autotuning is enabled or not. Default is enabled but can be overridden by setting QUDA_...
QudaPrecision Precision() const
QudaFieldOrder FieldOrder() const