6 template <
typename FloatOut,
typename FloatIn,
int length,
typename InOrder>
14 const bool override =
true;
17 copyGauge<FloatOut, FloatIn, length>(G(out, Out, outGhost,
override), inOrder,
out,
in, location, type);
19 #if QUDA_RECONSTRUCT & 2 21 copyGauge<FloatOut, FloatIn, length>(G(out, Out, outGhost,
override), inOrder,
out,
in, location, type);
23 errorQuda(
"QUDA_RECONSTRUCT=%d does not enable reconstruct-12", QUDA_RECONSTRUCT);
26 #if QUDA_RECONSTRUCT & 1 28 copyGauge<FloatOut, FloatIn, length>(G(out, Out, outGhost,
override), inOrder,
out,
in, location, type);
30 errorQuda(
"QUDA_RECONSTRUCT=%d does not enable reconstruct-8", QUDA_RECONSTRUCT);
32 #ifdef GPU_STAGGERED_DIRAC 34 #if QUDA_RECONSTRUCT & 2 36 copyGauge<FloatOut, FloatIn, length>(G(out, Out, outGhost,
override), inOrder,
out,
in, location, type);
38 errorQuda(
"QUDA_RECONSTRUCT=%d does not enable reconstruct-13", QUDA_RECONSTRUCT);
41 #if QUDA_RECONSTRUCT & 1 44 copyGauge<FloatOut, FloatIn, length>(G(out, Out, outGhost,
override), inOrder,
out,
in, location, type);
46 #ifdef BUILD_TIFR_INTERFACE 48 copyGauge<FloatOut, FloatIn, length>(G(out, Out, outGhost,
override), inOrder,
out,
in, location, type);
50 errorQuda(
"TIFR interface has not been built so TIFR phase type not enabled\n");
54 copyGauge<FloatOut, FloatIn, length>(G(out, Out, outGhost,
override), inOrder,
out,
in, location, type);
59 errorQuda(
"QUDA_RECONSTRUCT=%d does not enable reconstruct-9", QUDA_RECONSTRUCT);
61 #endif // GPU_STAGGERED_DIRAC 67 #ifdef BUILD_QDP_INTERFACE 68 copyGauge<FloatOut,FloatIn,length>
71 errorQuda(
"QDP interface has not been built\n");
76 #ifdef BUILD_QDPJIT_INTERFACE 77 copyGauge<FloatOut,FloatIn,length>
80 errorQuda(
"QDPJIT interface has not been built\n");
85 #ifdef BUILD_CPS_INTERFACE 86 copyGauge<FloatOut,FloatIn,length>
89 errorQuda(
"CPS interface has not been built\n");
94 #ifdef BUILD_MILC_INTERFACE 95 copyGauge<FloatOut,FloatIn,length>
98 errorQuda(
"MILC interface has not been built\n");
103 #ifdef BUILD_MILC_INTERFACE 104 copyGauge<FloatOut,FloatIn,length>
107 errorQuda(
"MILC interface has not been built\n");
112 #ifdef BUILD_BQCD_INTERFACE 113 copyGauge<FloatOut,FloatIn,length>
116 errorQuda(
"BQCD interface has not been built\n");
121 #ifdef BUILD_TIFR_INTERFACE 122 copyGauge<FloatOut,FloatIn,length>
125 errorQuda(
"TIFR interface has not been built\n");
130 #ifdef BUILD_TIFR_INTERFACE 131 copyGauge<FloatOut,FloatIn,length>
134 errorQuda(
"TIFR interface has not been built\n");
143 template <
typename FloatOut,
typename FloatIn,
int length>
145 FloatOut **outGhost, FloatIn **inGhost,
int type)
154 const bool override =
true;
157 copyGauge<FloatOut, FloatIn, length>(G(in, In, inGhost,
override),
out,
in, location, Out, outGhost, type);
159 #if QUDA_RECONSTRUCT & 2 161 copyGauge<FloatOut,FloatIn,length> (G(in,In,inGhost,
override),
out,
in, location, Out, outGhost, type);
163 errorQuda(
"QUDA_RECONSTRUCT=%d does not enable reconstruct-12", QUDA_RECONSTRUCT);
166 #if QUDA_RECONSTRUCT & 1 168 copyGauge<FloatOut,FloatIn,length> (G(in,In,inGhost,
override),
out,
in, location, Out, outGhost, type);
170 errorQuda(
"QUDA_RECONSTRUCT=%d does not enable reconstruct-8", QUDA_RECONSTRUCT);
172 #ifdef GPU_STAGGERED_DIRAC 174 #if QUDA_RECONSTRUCT & 2 176 copyGauge<FloatOut,FloatIn,length> (G(in,In,inGhost,
override),
out,
in, location, Out, outGhost, type);
178 errorQuda(
"QUDA_RECONSTRUCT=%d does not enable reconstruct-13", QUDA_RECONSTRUCT);
181 #if QUDA_RECONSTRUCT & 1 184 copyGauge<FloatOut, FloatIn, length>(G(in, In, inGhost,
override),
out,
in, location, Out, outGhost, type);
187 copyGauge<FloatOut, FloatIn, length>(G(in, In, inGhost,
override),
out,
in, location, Out, outGhost, type);
192 errorQuda(
"QUDA_RECONSTRUCT=%d does not enable reconstruct-9", QUDA_RECONSTRUCT);
194 #endif // GPU_STAGGERED_DIRAC 200 #ifdef BUILD_QDP_INTERFACE 202 out, in, location, Out, outGhost, type);
204 errorQuda(
"QDP interface has not been built\n");
209 #ifdef BUILD_QDPJIT_INTERFACE 211 out, in, location, Out, outGhost, type);
213 errorQuda(
"QDPJIT interface has not been built\n");
218 #ifdef BUILD_CPS_INTERFACE 220 out, in, location, Out, outGhost, type);
222 errorQuda(
"CPS interface has not been built\n");
227 #ifdef BUILD_MILC_INTERFACE 229 out, in, location, Out, outGhost, type);
231 errorQuda(
"MILC interface has not been built\n");
236 #ifdef BUILD_MILC_INTERFACE 238 out, in, location, Out, outGhost, type);
240 errorQuda(
"MILC interface has not been built\n");
245 #ifdef BUILD_BQCD_INTERFACE 247 out, in, location, Out, outGhost, type);
249 errorQuda(
"BQCD interface has not been built\n");
254 #ifdef BUILD_TIFR_INTERFACE 256 out, in, location, Out, outGhost, type);
258 errorQuda(
"TIFR interface has not been built\n");
263 #ifdef BUILD_TIFR_INTERFACE 265 out, in, location, Out, outGhost, type);
267 errorQuda(
"TIFR interface has not been built\n");
277 template <
typename FloatOut,
typename FloatIn,
int length,
typename Out,
typename In,
typename Arg>
283 template <
typename FloatOut,
typename FloatIn>
285 FloatOut **outGhost, FloatIn **inGhost,
int type)
298 copyGauge<FloatOut,FloatIn,18>(
out,
in, location, Out, In, outGhost, inGhost, type);
309 const bool override =
true;
317 copyMom<FloatOut,FloatIn,10,momOut,momIn>(
arg,
out,
in,location);
319 #ifdef BUILD_MILC_INTERFACE 323 copyMom<FloatOut,FloatIn,10,momOut,momIn>(
arg,
out,
in,location);
325 errorQuda(
"MILC interface has not been built\n");
328 #ifdef BUILD_MILC_INTERFACE 332 copyMom<FloatOut,FloatIn,10,momOut,momIn>(
arg,
out,
in,location);
334 errorQuda(
"MILC interface has not been built\n");
337 #ifdef BUILD_TIFR_INTERFACE 341 copyMom<FloatOut,FloatIn,18,momOut,momIn>(
arg,
out,
in,location);
343 errorQuda(
"TIFR interface has not been built\n");
346 #ifdef BUILD_TIFR_INTERFACE 350 copyMom<FloatOut,FloatIn,18,momOut,momIn>(
arg,
out,
in,location);
352 errorQuda(
"TIFR interface has not been built\n");
359 #ifdef BUILD_MILC_INTERFACE 363 copyMom<FloatOut,FloatIn,10,momOut,momIn>(
arg,
out,
in,location);
367 copyMom<FloatOut,FloatIn,10,momOut,momIn>(
arg,
out,
in,location);
372 errorQuda(
"MILC interface has not been built\n");
376 #ifdef BUILD_MILC_INTERFACE 380 copyMom<FloatOut,FloatIn,10,momOut,momIn>(
arg,
out,
in,location);
384 copyMom<FloatOut,FloatIn,10,momOut,momIn>(
arg,
out,
in,location);
389 errorQuda(
"MILC interface has not been built\n");
393 #ifdef BUILD_TIFR_INTERFACE 398 copyMom<FloatOut,FloatIn,18,momOut,momIn>(
arg,
out,
in,location);
402 copyMom<FloatOut,FloatIn,18,momOut,momIn>(
arg,
out,
in,location);
407 errorQuda(
"TIFR interface has not been built\n");
411 #ifdef BUILD_TIFR_INTERFACE 416 copyMom<FloatOut,FloatIn,18,momOut,momIn>(
arg,
out,
in,location);
420 copyMom<FloatOut,FloatIn,18,momOut,momIn>(
arg,
out,
in,location);
425 errorQuda(
"TIFR interface has not been built\n");
434 template <
typename FloatOut>
436 void **ghostOut,
void **ghostIn,
int type)
439 copyGauge(out, in, location, (FloatOut *)Out, (
double *)In, (FloatOut **)ghostOut, (
double **)ghostIn, type);
441 #if QUDA_PRECISION & 4 442 copyGauge(out, in, location, (FloatOut *)Out, (
float *)In, (FloatOut **)ghostOut, (
float **)ghostIn, type);
444 errorQuda(
"QUDA_PRECISION=%d does not enable single precision", QUDA_PRECISION);
447 #if QUDA_PRECISION & 2 448 copyGauge(out, in, location, (FloatOut *)Out, (
short *)In, (FloatOut **)ghostOut, (
short **)ghostIn, type);
450 errorQuda(
"QUDA_PRECISION=%d does not enable half precision", QUDA_PRECISION);
453 #if QUDA_PRECISION & 1 454 copyGauge(out, in, location, (FloatOut *)Out, (
char *)In, (FloatOut **)ghostOut, (
char **)ghostIn, type);
456 errorQuda(
"QUDA_PRECISION=%d does not enable quarter precision", QUDA_PRECISION);
struct to define TIFR ordered gauge fields: [mu][parity][volumecb][col][row]
void apply(const cudaStream_t &stream)
void copyGenericGauge(GaugeField &out, const GaugeField &in, QudaFieldLocation location, void *Out=0, void *In=0, void **ghostOut=0, void **ghostIn=0, int type=0)
QudaLinkType LinkType() const
QudaFieldGeometry Geometry() const
struct to define gauge fields packed into an opaque MILC site struct:
Main header file for host and device accessors to GaugeFields.
enum QudaFieldLocation_s QudaFieldLocation
cpuColorSpinorField * out
void copyMom(Arg &arg, const GaugeField &out, const GaugeField &in, QudaFieldLocation location)
__host__ __device__ ValueType arg(const complex< ValueType > &z)
Returns the phase angle of z.
Accessor routine for CloverFields in native field order.
QudaReconstructType Reconstruct() const
QudaGaugeFieldOrder Order() const
QudaStaggeredPhase StaggeredPhase() const
void checkMomOrder(const GaugeField &u)
QudaPrecision Precision() const