10 template <
typename Float,
int nColor, QudaReconstructType reconstruct_>
19 WilsonArg<Float,
nColor, reconstruct_>(out, in, U, xpay ? a : 0.0, x, parity, dagger, comm_override),
27 template <
typename Float,
int nDim,
int nColor,
int nParity,
bool dagger,
bool xpay, KernelType kernel_type,
typename Arg>
37 int x_cb = getCoords<nDim, QUDA_5D_PC, kernel_type>(coord,
arg, idx,
parity, thread_dim);
43 applyWilson<Float, nDim, nColor, nParity, dagger, kernel_type>(
44 out,
arg, coord, x_cb, 0,
parity, idx, thread_dim, active);
48 const int s = coord[4];
49 const int their_spinor_parity =
nParity == 2 ? 1 -
parity : 0;
51 const int fwd_idx = getNeighborIndexCB<nDim>(coord, d, +1, arg.dc);
52 constexpr
int proj_dir =
dagger ? +1 : -1;
53 Vector
in = arg.in(fwd_idx, their_spinor_parity);
54 if (s == arg.Ls - 1) {
55 out += (-arg.m_f * in.project(d, proj_dir)).
reconstruct(d, proj_dir);
57 out += in.project(d, proj_dir).reconstruct(d, proj_dir);
62 const int back_idx = getNeighborIndexCB<nDim>(coord, d, -1, arg.dc);
63 constexpr
int proj_dir =
dagger ? -1 : +1;
64 Vector
in = arg.in(back_idx, their_spinor_parity);
66 out += (-arg.m_f * in.project(d, proj_dir)).
reconstruct(d, proj_dir);
68 out += in.project(d, proj_dir).reconstruct(d, proj_dir);
74 Vector
x = arg.x(x_cb, my_spinor_parity);
75 out = x + arg.a *
out;
77 Vector
x = arg.out(x_cb, my_spinor_parity);
85 template <
typename Float,
int nDim,
int nColor,
int nParity,
bool dagger,
bool xpay, KernelType kernel_type,
typename Arg>
92 for (
int x5_cb = 0; x5_cb < arg.threads * arg.Ls; x5_cb++) {
93 domainWall5D<Float, nDim, nColor, nParity, dagger, xpay, kernel_type>(
arg, x5_cb,
parity);
99 template <
typename Float,
int nDim,
int nColor,
int nParity,
bool dagger,
bool xpay, KernelType kernel_type,
typename Arg>
102 int x_cb = blockIdx.x * blockDim.x + threadIdx.x;
103 if (x_cb >= arg.threads)
return;
106 int s = blockIdx.y * blockDim.y + threadIdx.y;
107 if (s >= arg.Ls)
return;
109 int x5_cb = s * arg.threads + x_cb;
112 int parity =
nParity == 2 ? blockDim.z * blockIdx.z + threadIdx.z : arg.parity;
115 case 0: domainWall5D<Float, nDim, nColor, nParity, dagger, xpay, kernel_type>(
arg, x5_cb, 0);
break;
116 case 1: domainWall5D<Float, nDim, nColor, nParity, dagger, xpay, kernel_type>(
arg, x5_cb, 1);
break;
mapper< Float >::type real
__global__ void domainWall5DGPU(Arg arg)
void domainWall5DCPU(Arg &arg)
static constexpr QudaReconstructType reconstruct
Parameter structure for driving the Wilson operator.
DomainWall5DArg(ColorSpinorField &out, const ColorSpinorField &in, const GaugeField &U, double a, double m_f, bool xpay, const ColorSpinorField &x, int parity, bool dagger, const int *comm_override)
__host__ __device__ ValueType arg(const complex< ValueType > &z)
Returns the phase angle of z.
__device__ __host__ void domainWall5D(Arg &arg, int idx, int parity)