66 compute_fat_link_max(false),
68 staggeredPhaseApplied(false),
83 reconstruct(reconstruct),
93 compute_fat_link_max(false),
95 staggeredPhaseApplied(false),
106 link_type(link_type_ !=
QUDA_INVALID_LINKS ? link_type_ : param.type), t_boundary(param.t_boundary),
107 anisotropy(param.anisotropy), tadpole(param.tadpole_coeff), gauge(h_gauge),
109 compute_fat_link_max(false), staggeredPhaseType(param.staggered_phase_type),
110 staggeredPhaseApplied(param.staggered_phase_applied), i_mu(param.i_mu),
111 site_offset(param.gauge_offset), site_size(param.site_size)
122 errorQuda(
"Error: invalid link type(%d)\n", link_type);
134 bool native = force_native ? true :
false;
209 void exchange(
void **recv,
void **send,
QudaDirection dir)
const;
234 void createGhostZone(
const int *
R,
bool no_comms_fill,
bool bidir =
true)
const;
239 void setTuningString();
273 void removeStaggeredPhase();
309 bool isNative()
const;
321 virtual const void*
Odd_p()
const {
errorQuda(
"Not implemented");
return (
void*)0;}
324 if ( isNative() )
errorQuda(
"No ghost zone pointer for quda-native gauge fields");
325 return (
const void**)ghost;
329 if ( isNative() )
errorQuda(
"No ghost zone pointer for quda-native gauge fields");
348 virtual void zero() = 0;
361 double norm1(
int dim=-1)
const;
368 double norm2(
int dim=-1)
const;
375 double abs_max(
int dim=-1)
const;
382 double abs_min(
int dim=-1)
const;
392 uint64_t checksum(
bool mini=
false)
const;
417 #ifdef USE_TEXTURE_OBJECTS 418 cudaTextureObject_t tex;
419 cudaTextureObject_t evenTex;
420 cudaTextureObject_t oddTex;
421 cudaTextureObject_t phaseTex;
422 cudaTextureObject_t evenPhaseTex;
423 cudaTextureObject_t oddPhaseTex;
424 void createTexObject(cudaTextureObject_t &tex,
void *gauge,
bool full,
bool isPhase=
false);
425 void destroyTexObject();
456 void createComms(
const int *
R,
bool no_comms_fill,
bool bidir=
true);
466 void allocateGhostBuffer(
const int *
R,
bool no_comms_fill,
bool bidir=
true)
const;
473 void recvStart(
int dim,
int dir);
482 void sendStart(
int dim,
int dir, cudaStream_t *stream_p=
nullptr);
551 const void*
Even_p()
const {
return even; }
552 const void *
Odd_p()
const {
return odd; }
554 #ifdef USE_TEXTURE_OBJECTS 555 const cudaTextureObject_t& Tex()
const {
return tex; }
556 const cudaTextureObject_t& EvenTex()
const {
return evenTex; }
557 const cudaTextureObject_t& OddTex()
const {
return oddTex; }
558 const cudaTextureObject_t& EvenPhaseTex()
const {
return evenPhaseTex; }
559 const cudaTextureObject_t& OddPhaseTex()
const {
return oddPhaseTex; }
562 void setGauge(
void* _gauge);
577 void restore()
const;
645 void setGauge(
void** _gauge);
660 void restore()
const;
699 void **ghostOut = 0,
void **ghostIn = 0,
int type = 0);
755 #endif // _GAUGE_QUDA_H
void extractGaugeGhost(const GaugeField &u, void **ghost, bool extract=true, int offset=0)
QudaGhostExchange ghostExchange
enum QudaPrecision_s QudaPrecision
void saveCPUField(cpuGaugeField &cpu) const
Upload from this field into a CPU field.
QudaGaugeFieldOrder FieldOrder() const
void copyGenericGauge(GaugeField &out, const GaugeField &in, QudaFieldLocation location, void *Out=0, void *In=0, void **ghostOut=0, void **ghostIn=0, int type=0)
const void * Gauge_p() const
const void * Gauge_p() const
enum QudaLinkDirection_s QudaLinkDirection
QudaReconstructType reconstruct
bool staggeredPhaseApplied
QudaLinkType LinkType() const
uint64_t Checksum(const GaugeField &u, bool mini=false)
__host__ __device__ void copy(T1 &a, const T2 &b)
QudaFieldGeometry Geometry() const
void applyGaugePhase(GaugeField &u)
enum QudaTboundary_s QudaTboundary
QudaStaggeredPhase staggeredPhaseType
std::ostream & operator<<(std::ostream &output, const CloverFieldParam ¶m)
double norm2(const CloverField &a, bool inverse=false)
QudaFieldGeometry geometry
virtual const void * Odd_p() const
double norm1(const CloverField &u, bool inverse=false)
enum QudaDirection_s QudaDirection
void loadCPUField(const cpuGaugeField &cpu)
Download into this field from a CPU field.
void ax(const double &a, GaugeField &u)
Scale the gauge field by the scalar a.
enum QudaStaggeredPhase_s QudaStaggeredPhase
bool StaggeredPhaseApplied() const
bool staggeredPhaseApplied
void extractExtendedGaugeGhost(const GaugeField &u, int dim, const int *R, void **ghost, bool extract)
enum QudaGhostExchange_s QudaGhostExchange
QudaFieldLocation location
double Anisotropy() const
QudaGaugeFieldOrder order
void exchangeExtendedGhost(cudaColorSpinorField *spinor, int R[], int parity, cudaStream_t *stream_p)
enum QudaGaugeFixed_s QudaGaugeFixed
const void ** Ghost() const
enum QudaGaugeFieldOrder_s QudaGaugeFieldOrder
QudaStaggeredPhase staggeredPhaseType
enum QudaLinkType_s QudaLinkType
size_t PhaseOffset() const
enum QudaFieldLocation_s QudaFieldLocation
void setPrecision(QudaPrecision precision, bool force_native=false)
Helper function for setting the precision and corresponding field order for QUDA internal fields...
size_t PhaseBytes() const
cpuColorSpinorField * out
const double & LinkMax() const
QudaGaugeFieldOrder gauge_order
enum QudaReconstructType_s QudaReconstructType
Main header file for the QUDA library.
GaugeFieldParam(void *const h_gauge=NULL)
GaugeFieldParam(const int *x, const QudaPrecision precision, const QudaReconstructType reconstruct, const int pad, const QudaFieldGeometry geometry, const QudaGhostExchange ghostExchange=QUDA_GHOST_EXCHANGE_PAD)
bool commsComplete(cudaColorSpinorField &in, const Dslash &dslash, int dim, int dir, bool gdr_send, bool gdr_recv, bool zero_copy_recv, bool async, int scatterIndex=-1)
Wrapper for querying if communication is finished in the dslash, and if it is take the appropriate ac...
const void * Odd_p() const
virtual const void * Even_p() const
QudaReconstructType reconstruct
virtual const void * Gauge_p() const
QudaPrecision ghost_precision
QudaReconstructType Reconstruct() const
enum QudaFieldCreate_s QudaFieldCreate
enum QudaFieldGeometry_s QudaFieldGeometry
QudaGaugeFieldOrder Order() const
#define QUDA_MAX_DIM
Maximum number of dimensions supported by QUDA. In practice, no routines make use of more than 5...
bool compute_fat_link_max
QudaFieldGeometry geometry
QudaTboundary TBoundary() const
QudaStaggeredPhase StaggeredPhase() const
QudaGaugeFieldOrder order
QudaGaugeFixed GaugeFixed() const
void copy(const GaugeField &src)
__device__ __host__ void zero(vector_type< scalar, n > &v)
GaugeFieldParam(void *h_gauge, const QudaGaugeParam ¶m, QudaLinkType link_type_=QUDA_INVALID_LINKS)
void copyExtendedGauge(GaugeField &out, const GaugeField &in, QudaFieldLocation location, void *Out=0, void *In=0)
const void * Even_p() const
size_t SiteOffset() const