198 std::ostream&
operator<<(std::ostream& output,
const GaugeFieldParam&
param);
270 void createGhostZone(
const int *
R,
bool no_comms_fill,
bool bidir =
true)
const;
364 virtual const void*
Odd_p()
const {
errorQuda(
"Not implemented");
return (
void*)0;}
369 if (
isNative() )
errorQuda(
"No ghost zone pointer for quda-native gauge fields");
370 return (
const void**)
ghost;
374 if (
isNative() )
errorQuda(
"No ghost zone pointer for quda-native gauge fields");
437 uint64_t
checksum(
bool mini =
false)
const;
490 void createComms(
const int *
R,
bool no_comms_fill,
bool bidir=
true);
585 const void*
Even_p()
const {
return even; }
586 const void *
Odd_p()
const {
return odd; }
727 double norm1(
const GaugeField &u);
735 double norm2(
const GaugeField &u);
742 void ax(
const double &a, GaugeField &u);
757 void **ghostOut = 0,
void **ghostIn = 0,
int type = 0);
868 template <
typename... Args>
876 #define checkReconstruct(...) Reconstruct_(__func__, __FILE__, __LINE__, __VA_ARGS__)
QudaFieldGeometry Geometry() const
QudaStaggeredPhase StaggeredPhase() const
void * ghost[2 *QUDA_MAX_DIM]
size_t SiteOffset() const
size_t PhaseOffset() const
size_t TotalBytes() const
void removeStaggeredPhase()
void setTuningString()
Set the vol_string and aux_string for use in tuning.
QudaGaugeFieldOrder order
double norm2(int dim=-1, bool fixed=false) const
Compute the L2 norm squared of the field.
QudaLinkType LinkType() const
bool staggeredPhaseApplied
virtual void exchangeExtendedGhost(const int *R, bool no_comms_fill=false)=0
This routine will populate the border / halo region of a gauge field that has been created using copy...
QudaStaggeredPhase staggeredPhaseType
size_t PhaseBytes() const
double norm1(int dim=-1, bool fixed=false) const
Compute the L1 norm of the field.
GaugeField(const GaugeFieldParam ¶m)
QudaGaugeFieldOrder Order() const
const double & LinkMax() const
QudaGaugeFieldOrder FieldOrder() const
static GaugeField * Create(const GaugeFieldParam ¶m)
Create the gauge field, with meta data specified in the parameter struct.
virtual const void * Odd_p() const
virtual void exchangeExtendedGhost(const int *R, TimeProfile &profile, bool no_comms_fill=false)=0
This routine will populate the border / halo region of a gauge field that has been created using copy...
void exchange(void **recv, void **send, QudaDirection dir) const
Exchange the buffers across all dimensions in a given direction.
QudaTboundary TBoundary() const
virtual int full_dim(int d) const
void applyStaggeredPhase(QudaStaggeredPhase phase=QUDA_STAGGERED_PHASE_INVALID)
QudaGaugeFixed GaugeFixed() const
uint64_t checksum(bool mini=false) const
virtual void copy(const GaugeField &src)=0
virtual void injectGhost(QudaLinkDirection=QUDA_LINK_BACKWARDS)=0
int ghostFace[QUDA_MAX_DIM]
double abs_max(int dim=-1, bool fixed=false) const
Compute the absolute maximum of the field (Linfinity norm)
virtual void exchangeGhost(QudaLinkDirection=QUDA_LINK_BACKWARDS)=0
double abs_min(int dim=-1, bool fixed=false) const
Compute the absolute minimum of the field.
void checkField(const LatticeField &) const
QudaFieldGeometry geometry
virtual const void * Even_p() const
QudaReconstructType reconstruct
double Anisotropy() const
const void ** Ghost() const
bool StaggeredPhaseApplied() const
void createGhostZone(const int *R, bool no_comms_fill, bool bidir=true) const
QudaReconstructType Reconstruct() const
virtual const void * Gauge_p() const
const void * Gauge_p() const
void copy(const GaugeField &src)
virtual void copy_from_buffer(void *buffer)
Copy all contents of the field from a host buffer to this field.
void setGauge(void **_gauge)
void backup() const
Backs up the cpuGaugeField.
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 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 exchangeGhost(QudaLinkDirection link_direction=QUDA_LINK_BACKWARDS)
Exchange the ghost and store store in the padded region.
void restore() const
Restores the cpuGaugeField.
cpuGaugeField(const GaugeFieldParam ¶m)
Constructor for cpuGaugeField from a GaugeFieldParam.
virtual void copy_to_buffer(void *buffer) const
Copy all contents of the field to a host buffer.
virtual void copy_from_buffer(void *buffer)
Copy all contents of the field from a host buffer to this field.
const void * Even_p() const
void setGauge(void *_gauge)
void copy(const GaugeField &src)
void prefetch(QudaFieldLocation mem_space, qudaStream_t stream=0) const
If managed memory and prefetch is enabled, prefetch the gauge field and buffers to the CPU or the GPU...
const void * Gauge_p() const
void exchangeGhost(QudaLinkDirection link_direction=QUDA_LINK_BACKWARDS)
Exchange the ghost and store store in the padded region.
void createComms(const int *R, bool no_comms_fill, bool bidir=true)
Create the communication handlers and buffers.
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 recvStart(int dim, int dir)
Start the receive communicators.
void sendStart(int dim, int dir, qudaStream_t *stream_p=nullptr)
Start the sending communicators.
void loadCPUField(const cpuGaugeField &cpu)
Download into this field from a CPU field.
const void * Odd_p() const
void backup() const
Backs up the cudaGaugeField to CPU memory.
virtual ~cudaGaugeField()
void allocateGhostBuffer(const int *R, bool no_comms_fill, bool bidir=true) const
Allocate the ghost buffers.
void saveCPUField(cpuGaugeField &cpu) const
Upload from this field into a CPU field.
virtual void copy_to_buffer(void *buffer) const
Copy all contents of the field to a host buffer.
void restore() const
Restores the cudaGaugeField to CUDA memory.
cudaGaugeField(const GaugeFieldParam &)
void commsComplete(int dim, int dir)
Wait for communication to complete.
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...
QudaGaugeParam gauge_param
enum QudaPrecision_s QudaPrecision
enum QudaGaugeFixed_s QudaGaugeFixed
enum QudaStaggeredPhase_s QudaStaggeredPhase
enum QudaLinkDirection_s QudaLinkDirection
@ QUDA_STAGGERED_PHASE_NO
@ QUDA_STAGGERED_PHASE_INVALID
@ QUDA_CPU_FIELD_LOCATION
@ QUDA_INVALID_FIELD_LOCATION
enum QudaDirection_s QudaDirection
enum QudaGaugeFieldOrder_s QudaGaugeFieldOrder
enum QudaTboundary_s QudaTboundary
@ QUDA_RECONSTRUCT_INVALID
@ QUDA_INVALID_T_BOUNDARY
enum QudaPCType_s QudaPCType
enum QudaFieldGeometry_s QudaFieldGeometry
enum QudaFieldLocation_s QudaFieldLocation
@ QUDA_GHOST_EXCHANGE_PAD
enum QudaFieldCreate_s QudaFieldCreate
enum QudaGhostExchange_s QudaGhostExchange
enum QudaReconstructType_s QudaReconstructType
@ QUDA_FLOAT2_GAUGE_ORDER
@ QUDA_FLOAT4_GAUGE_ORDER
@ QUDA_FLOAT8_GAUGE_ORDER
@ QUDA_INVALID_GAUGE_ORDER
@ QUDA_REFERENCE_FIELD_CREATE
enum QudaLinkType_s QudaLinkType
QudaGaugeFieldOrder gauge_order
bool isNative(QudaGaugeFieldOrder order, QudaPrecision precision, QudaReconstructType reconstruct)
QudaReconstructType Reconstruct_(const char *func, const char *file, int line, const GaugeField &a, const GaugeField &b)
Helper function for determining if the reconstruct of the fields is the same.
void copyGenericGauge(GaugeField &out, const GaugeField &in, QudaFieldLocation location, void *Out=0, void *In=0, void **ghostOut=0, void **ghostIn=0, int type=0)
void extractGaugeGhost(const GaugeField &u, void **ghost, bool extract=true, int offset=0)
double norm2(const CloverField &a, bool inverse=false)
void ax(const double &a, GaugeField &u)
Scale the gauge field by the scalar a.
void extractExtendedGaugeGhost(const GaugeField &u, int dim, const int *R, void **ghost, bool extract)
uint64_t Checksum(const GaugeField &u, bool mini=false)
double norm1(const CloverField &u, bool inverse=false)
cudaGaugeField * createExtendedGauge(cudaGaugeField &in, const int *R, TimeProfile &profile, bool redundant_comms=false, QudaReconstructType recon=QUDA_RECONSTRUCT_INVALID)
void copyExtendedGauge(GaugeField &out, const GaugeField &in, QudaFieldLocation location, void *Out=0, void *In=0)
void copyFieldOffset(CloverField &out, const CloverField &in, CommKey offset, QudaPCType pc_type)
This function is used for copying from a source clover field to a destination clover field with an of...
void applyGaugePhase(GaugeField &u)
std::ostream & operator<<(std::ostream &output, const CloverFieldParam ¶m)
Main header file for the QUDA library.
cudaStream_t qudaStream_t
#define QUDA_MAX_DIM
Maximum number of dimensions supported by QUDA. In practice, no routines make use of more than 5.
QudaReconstructType reconstruct
GaugeFieldParam(void *const h_gauge=NULL)
QudaGaugeFieldOrder order
QudaFieldGeometry geometry
void setPrecision(QudaPrecision precision, bool force_native=false)
Helper function for setting the precision and corresponding field order for QUDA internal fields.
QudaStaggeredPhase staggeredPhaseType
GaugeFieldParam(void *h_gauge, const QudaGaugeParam ¶m, QudaLinkType link_type_=QUDA_INVALID_LINKS)
bool compute_fat_link_max
QudaFieldLocation location
GaugeFieldParam(const int *x, const QudaPrecision precision, const QudaReconstructType reconstruct, const int pad, const QudaFieldGeometry geometry, const QudaGhostExchange ghostExchange=QUDA_GHOST_EXCHANGE_PAD)
bool staggeredPhaseApplied
QudaGhostExchange ghostExchange
QudaPrecision ghost_precision