121 std::ostream&
operator<<(std::ostream& output,
const GaugeFieldParam&
param);
252 virtual const void*
Odd_p()
const {
errorQuda(
"Not implemented");
return (
void*)0;}
255 if (
isNative() )
errorQuda(
"No ghost zone pointer for quda-native gauge fields");
256 return (
const void**)
ghost;
260 if (
isNative() )
errorQuda(
"No ghost zone pointer for quda-native gauge fields");
279 virtual void zero() = 0;
305 #ifdef USE_TEXTURE_OBJECTS 306 cudaTextureObject_t
tex;
307 cudaTextureObject_t evenTex;
308 cudaTextureObject_t oddTex;
309 cudaTextureObject_t phaseTex;
310 cudaTextureObject_t evenPhaseTex;
311 cudaTextureObject_t oddPhaseTex;
312 void createTexObject(cudaTextureObject_t &
tex,
void *
gauge,
bool full,
bool isPhase=
false);
313 void destroyTexObject();
365 void sendStart(
int dim,
int dir, cudaStream_t *stream_p=
nullptr);
437 #ifdef USE_TEXTURE_OBJECTS 438 const cudaTextureObject_t& Tex()
const {
return tex; }
439 const cudaTextureObject_t& EvenTex()
const {
return evenTex; }
440 const cudaTextureObject_t& OddTex()
const {
return oddTex; }
441 const cudaTextureObject_t& EvenPhaseTex()
const {
return evenPhaseTex; }
442 const cudaTextureObject_t& OddPhaseTex()
const {
return oddPhaseTex; }
554 double norm1(
const GaugeField &u);
562 double norm2(
const GaugeField &u);
569 void ax(
const double &
a, GaugeField &u);
584 void *Out=0,
void *In=0,
void **ghostOut=0,
void **ghostIn=0,
int type=0);
620 void **ghost,
bool extract);
627 double maxGauge(
const GaugeField &u);
648 #endif // _GAUGE_QUDA_H
void extractGaugeGhost(const GaugeField &u, void **ghost, bool extract=true, int offset=0)
QudaGhostExchange ghostExchange
void setGauge(void **_gauge)
double maxGauge(const GaugeField &u)
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
void exchangeExtendedGhost(const int *R, bool no_comms_fill=false)
This does routine will populate the border / halo region of a gauge field that has been created using...
const void * Gauge_p() const
void setPrecision(QudaPrecision precision)
Helper function for setting the precision and corresponding field order for QUDA internal fields...
enum QudaLinkDirection_s QudaLinkDirection
void injectGhost(QudaLinkDirection link_direction=QUDA_LINK_BACKWARDS)
The opposite of exchangeGhost: take the ghost zone on x, send to node x-1, and inject back into the f...
QudaReconstructType reconstruct
bool staggeredPhaseApplied
uint64_t checksum(bool mini=false) const
QudaLinkType LinkType() const
static __inline__ dim3 dim3 void size_t cudaStream_t int dim
uint64_t Checksum(const GaugeField &u, bool mini=false)
QudaFieldGeometry Geometry() const
void restore()
Restores the cudaGaugeField to CUDA memory.
void applyGaugePhase(GaugeField &u)
enum QudaTboundary_s QudaTboundary
QudaStaggeredPhase staggeredPhaseType
GaugeField(const GaugeFieldParam ¶m)
cudaGaugeField(const GaugeFieldParam &)
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 checkField(const LatticeField &) const
void ax(const double &a, GaugeField &u)
Scale the gauge field by the scalar a.
void commsComplete(int dim, int dir)
Wait for communication to complete.
void allocateGhostBuffer(const int *R, bool no_comms_fill) const
Allocate the ghost buffers.
enum QudaStaggeredPhase_s QudaStaggeredPhase
bool StaggeredPhaseApplied() const
void exchangeExtendedGhost(const int *R, bool no_comms_fill=false)
This does routine will populate the border / halo region of a gauge field that has been created using...
void copy(const GaugeField &src)
bool staggeredPhaseApplied
void sendStart(int dim, int dir, cudaStream_t *stream_p=nullptr)
Start the sending communicators.
void extractExtendedGaugeGhost(const GaugeField &u, int dim, const int *R, void **ghost, bool extract)
enum QudaGhostExchange_s QudaGhostExchange
double Anisotropy() const
QudaGaugeFieldOrder order
enum QudaGaugeFixed_s QudaGaugeFixed
unsigned long long uint64_t
void exchange(void **recv, void **send, QudaDirection dir) const
Exchange the buffers across all dimensions in a given direction.
void exchangeGhost(QudaLinkDirection link_direction=QUDA_LINK_BACKWARDS)
Exchange the ghost and store store in the padded region.
void restore()
Restores the cpuGaugeField.
const void ** Ghost() const
enum QudaGaugeFieldOrder_s QudaGaugeFieldOrder
void injectGhost(QudaLinkDirection link_direction=QUDA_LINK_BACKWARDS)
The opposite of exchangeGhost: take the ghost zone on x, send to node x-1, and inject back into the f...
void backup() const
Backs up the cudaGaugeField to CPU memory.
QudaStaggeredPhase staggeredPhaseType
enum QudaLinkType_s QudaLinkType
virtual void injectGhost(QudaLinkDirection=QUDA_LINK_BACKWARDS)=0
cpuGaugeField(const GaugeFieldParam ¶m)
Constructor for cpuGaugeField from a GaugeFieldParam.
void recvStart(int dim, int dir)
Start the receive communicators.
size_t PhaseOffset() const
enum QudaFieldLocation_s QudaFieldLocation
void backup() const
Backs up the cpuGaugeField.
void exchangeGhost(QudaLinkDirection link_direction=QUDA_LINK_BACKWARDS)
Exchange the ghost and store store in the padded region.
size_t PhaseBytes() const
void createGhostZone(const int *R, bool no_comms_fill) 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)
void applyStaggeredPhase()
void setGauge(void *_gauge)
const void * Odd_p() const
static __inline__ dim3 dim3 void size_t cudaStream_t int enum cudaTextureReadMode readMode static __inline__ const struct texture< T, dim, readMode > & tex
virtual void exchangeGhost(QudaLinkDirection=QUDA_LINK_BACKWARDS)=0
void createComms(const int *R, bool no_comms_fill)
Create the communication handlers and buffers.
virtual const void * Even_p() const
QudaReconstructType reconstruct
virtual const void * Gauge_p() const
QudaReconstructType Reconstruct() const
enum QudaFieldCreate_s QudaFieldCreate
enum QudaFieldGeometry_s QudaFieldGeometry
virtual ~cudaGaugeField()
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)
void * ghost[2 *QUDA_MAX_DIM]
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
virtual void copy(const GaugeField &src)=0
size_t SiteOffset() const
int ghostFace[QUDA_MAX_DIM]
void removeStaggeredPhase()