|
QUDA
v1.1.0
A library for QCD on GPUs
|
#include <gauge_field.h>
Inheritance diagram for quda::cudaGaugeField:Public Member Functions | |
| cudaGaugeField (const GaugeFieldParam &) | |
| virtual | ~cudaGaugeField () |
| void | exchangeGhost (QudaLinkDirection link_direction=QUDA_LINK_BACKWARDS) |
| Exchange the ghost and store store in the padded region. More... | |
| 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 field. More... | |
| void | createComms (const int *R, bool no_comms_fill, bool bidir=true) |
| Create the communication handlers and buffers. More... | |
| void | allocateGhostBuffer (const int *R, bool no_comms_fill, bool bidir=true) const |
| Allocate the ghost buffers. More... | |
| void | recvStart (int dim, int dir) |
| Start the receive communicators. More... | |
| void | sendStart (int dim, int dir, qudaStream_t *stream_p=nullptr) |
| Start the sending communicators. More... | |
| void | commsComplete (int dim, int dir) |
| Wait for communication to complete. More... | |
| 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 copyExtendedGauge. More... | |
| void | exchangeExtendedGhost (const int *R, TimeProfile &profile, bool no_comms_fill=false) |
| This does routine will populate the border / halo region of a gauge field that has been created using copyExtendedGauge. Overloaded variant that will start and stop a comms profile. More... | |
| void | copy (const GaugeField &src) |
| void | loadCPUField (const cpuGaugeField &cpu) |
| Download into this field from a CPU field. More... | |
| void | loadCPUField (const cpuGaugeField &cpu, TimeProfile &profile) |
| Download into this field from a CPU field. Overloaded variant that includes profiling. More... | |
| void | saveCPUField (cpuGaugeField &cpu) const |
| Upload from this field into a CPU field. More... | |
| void | saveCPUField (cpuGaugeField &cpu, TimeProfile &profile) const |
| Upload from this field into a CPU field. Overloaded variant that includes profiling. More... | |
| void * | Gauge_p () |
| void * | Even_p () |
| void * | Odd_p () |
| const void * | Gauge_p () const |
| const void * | Even_p () const |
| const void * | Odd_p () const |
| virtual void | copy_to_buffer (void *buffer) const |
| Copy all contents of the field to a host buffer. More... | |
| virtual void | copy_from_buffer (void *buffer) |
| Copy all contents of the field from a host buffer to this field. More... | |
| void | setGauge (void *_gauge) |
| void | zero () |
| void | backup () const |
| Backs up the cudaGaugeField to CPU memory. More... | |
| void | restore () const |
| Restores the cudaGaugeField to CUDA memory. More... | |
| 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. More... | |
Public Member Functions inherited from quda::GaugeField | |
| GaugeField (const GaugeFieldParam ¶m) | |
| virtual | ~GaugeField () |
| size_t | Length () const |
| int | Ncolor () const |
| QudaReconstructType | Reconstruct () const |
| QudaGaugeFieldOrder | Order () const |
| double | Anisotropy () const |
| double | Tadpole () const |
| QudaTboundary | TBoundary () const |
| QudaLinkType | LinkType () const |
| QudaGaugeFixed | GaugeFixed () const |
| QudaGaugeFieldOrder | FieldOrder () const |
| QudaFieldGeometry | Geometry () const |
| QudaStaggeredPhase | StaggeredPhase () const |
| bool | StaggeredPhaseApplied () const |
| void | applyStaggeredPhase (QudaStaggeredPhase phase=QUDA_STAGGERED_PHASE_INVALID) |
| void | removeStaggeredPhase () |
| double | iMu () const |
| const double & | LinkMax () const |
| int | Nface () const |
| void | checkField (const LatticeField &) const |
| bool | isNative () const |
| size_t | Bytes () const |
| size_t | PhaseBytes () const |
| size_t | PhaseOffset () const |
| size_t | TotalBytes () const |
| virtual int | full_dim (int d) const |
| const void ** | Ghost () const |
| void ** | Ghost () |
| size_t | SiteOffset () const |
| size_t | SiteSize () const |
| double | norm1 (int dim=-1, bool fixed=false) const |
| Compute the L1 norm of the field. More... | |
| double | norm2 (int dim=-1, bool fixed=false) const |
| Compute the L2 norm squared of the field. More... | |
| double | abs_max (int dim=-1, bool fixed=false) const |
| Compute the absolute maximum of the field (Linfinity norm) More... | |
| double | abs_min (int dim=-1, bool fixed=false) const |
| Compute the absolute minimum of the field. More... | |
| uint64_t | checksum (bool mini=false) const |
Public Member Functions inherited from quda::LatticeField | |
| LatticeField (const LatticeFieldParam ¶m) | |
| LatticeField (const LatticeField &field) | |
| virtual | ~LatticeField () |
| void | allocateGhostBuffer (size_t ghost_bytes) const |
| Allocate the static ghost buffers. More... | |
| void | createComms (bool no_comms_fill=false, bool bidir=true) |
| void | destroyComms () |
| void | createIPCComms () |
| bool | ipcCopyComplete (int dir, int dim) |
| bool | ipcRemoteCopyComplete (int dir, int dim) |
| const cudaEvent_t & | getIPCCopyEvent (int dir, int dim) const |
| const cudaEvent_t & | getIPCRemoteCopyEvent (int dir, int dim) const |
| int | Ndim () const |
| const int * | X () const |
| size_t | Volume () const |
| size_t | VolumeCB () const |
| size_t | LocalVolume () const |
| size_t | LocalVolumeCB () const |
| const int * | SurfaceCB () const |
| int | SurfaceCB (const int i) const |
| size_t | Stride () const |
| int | Pad () const |
| const int * | R () const |
| QudaGhostExchange | GhostExchange () const |
| QudaPrecision | Precision () const |
| QudaPrecision | GhostPrecision () const |
| double | Scale () const |
| void | Scale (double scale_) |
| Set the scale factor for a fixed-point field. More... | |
| virtual QudaSiteSubset | SiteSubset () const |
| virtual QudaMemoryType | MemType () const |
| int | Nvec () const |
| QudaFieldLocation | Location () const |
| size_t | GBytes () const |
| void | checkField (const LatticeField &a) const |
| virtual void | read (char *filename) |
| virtual void | write (char *filename) |
| void * | myFace_h (int dir, int dim) const |
| Return pointer to the local pinned my_face buffer in a given direction and dimension. More... | |
| void * | myFace_hd (int dir, int dim) const |
| Return pointer to the local mapped my_face buffer in a given direction and dimension. More... | |
| void * | myFace_d (int dir, int dim) const |
| Return pointer to the device send buffer in a given direction and dimension. More... | |
| void * | remoteFace_d (int dir, int dim) const |
| Return base pointer to a remote device buffer for direct sending in a given direction and dimension. Since this is a base pointer, one still needs to take care of offsetting to the correct point for each direction/dimension. More... | |
| void * | remoteFace_r () const |
| Return base pointer to the ghost recv buffer. Since this is a base pointer, one still needs to take care of offsetting to the correct point for each direction/dimension. More... | |
| virtual void | gather (int nFace, int dagger, int dir, qudaStream_t *stream_p=NULL) |
| virtual void | commsStart (int nFace, int dir, int dagger=0, qudaStream_t *stream_p=NULL, bool gdr_send=false, bool gdr_recv=true) |
| virtual int | commsQuery (int nFace, int dir, int dagger=0, qudaStream_t *stream_p=NULL, bool gdr_send=false, bool gdr_recv=true) |
| virtual void | commsWait (int nFace, int dir, int dagger=0, qudaStream_t *stream_p=NULL, bool gdr_send=false, bool gdr_recv=true) |
| virtual void | scatter (int nFace, int dagger, int dir) |
| const char * | VolString () const |
| const char * | AuxString () const |
Public Member Functions inherited from quda::Object | |
| Object () | |
| virtual | ~Object () |
Definition at line 449 of file gauge_field.h.
| quda::cudaGaugeField::cudaGaugeField | ( | const GaugeFieldParam & | param | ) |
Definition at line 8 of file cuda_gauge_field.cpp.
|
virtual |
Definition at line 85 of file cuda_gauge_field.cpp.
| void quda::cudaGaugeField::allocateGhostBuffer | ( | const int * | R, |
| bool | no_comms_fill, | ||
| bool | bidir = true |
||
| ) | const |
Allocate the ghost buffers.
| [in] | R | The thickness of the extended region in each dimension |
| [in] | no_comms_fill | Do local exchange to fill out the extended |
| [in] | bidir | Is this a bi-directional exchange - if not then we alias the fowards and backwards offsetss region in non-partitioned dimensions |
Definition at line 282 of file cuda_gauge_field.cpp.
|
virtual |
Backs up the cudaGaugeField to CPU memory.
Reimplemented from quda::LatticeField.
Definition at line 721 of file cuda_gauge_field.cpp.
| void quda::cudaGaugeField::commsComplete | ( | int | dim, |
| int | dir | ||
| ) |
Wait for communication to complete.
| [in] | dim | The communication dimension |
| [in] | dir | The communication direction (0=backwards, 1=forwards) |
Definition at line 368 of file cuda_gauge_field.cpp.
|
virtual |
Generic gauge field copy
| [in] | src | Source from which we are copying |
Implements quda::GaugeField.
Definition at line 531 of file cuda_gauge_field.cpp.
|
virtual |
Copy all contents of the field from a host buffer to this field.
| [in] | the | host buffer to copy from. |
Implements quda::LatticeField.
Definition at line 758 of file cuda_gauge_field.cpp.
|
virtual |
Copy all contents of the field to a host buffer.
| [in] | the | host buffer to copy to. |
Implements quda::LatticeField.
Definition at line 753 of file cuda_gauge_field.cpp.
| void quda::cudaGaugeField::createComms | ( | const int * | R, |
| bool | no_comms_fill, | ||
| bool | bidir = true |
||
| ) |
Create the communication handlers and buffers.
| [in] | R | The thickness of the extended region in each dimension |
| [in] | no_comms_fill | Do local exchange to fill out the extended region in non-partitioned dimensions |
| [in] | bidir | Whether to allocate communication buffers to allow for simultaneous bi-directional exchange. If false, then the forwards and backwards buffers will alias (saving memory). |
Definition at line 288 of file cuda_gauge_field.cpp.
|
inlinevirtual |
Reimplemented from quda::GaugeField.
Definition at line 581 of file gauge_field.h.
|
inlinevirtual |
Reimplemented from quda::GaugeField.
Definition at line 585 of file gauge_field.h.
|
virtual |
This does routine will populate the border / halo region of a gauge field that has been created using copyExtendedGauge.
| R | The thickness of the extended region in each dimension |
| no_comms_fill | Do local exchange to fill out the extended region in non-partitioned dimensions |
Implements quda::GaugeField.
Definition at line 411 of file cuda_gauge_field.cpp.
|
virtual |
This does routine will populate the border / halo region of a gauge field that has been created using copyExtendedGauge. Overloaded variant that will start and stop a comms profile.
| R | The thickness of the extended region in each dimension |
| profile | TimeProfile intance which will record the time taken |
| no_comms_fill | Do local exchange to fill out the extended region in non-partitioned dimensions |
Implements quda::GaugeField.
Definition at line 477 of file cuda_gauge_field.cpp.
|
virtual |
Exchange the ghost and store store in the padded region.
| [in] | link_direction | Which links are we exchanging: this flag only applies to bi-directional coarse-link fields |
Implements quda::GaugeField.
Definition at line 113 of file cuda_gauge_field.cpp.
|
inlinevirtual |
Reimplemented from quda::GaugeField.
Definition at line 580 of file gauge_field.h.
|
inlinevirtual |
Reimplemented from quda::GaugeField.
Definition at line 584 of file gauge_field.h.
|
virtual |
The opposite of exchangeGhost: take the ghost zone on x, send to node x-1, and inject back into the field.
| [in] | link_direction | Which links are we injecting: this flag only applies to bi-directional coarse-link fields |
Implements quda::GaugeField.
Definition at line 199 of file cuda_gauge_field.cpp.
| void quda::cudaGaugeField::loadCPUField | ( | const cpuGaugeField & | cpu | ) |
Download into this field from a CPU field.
| [in] | cpu | The CPU field source |
Definition at line 635 of file cuda_gauge_field.cpp.
| void quda::cudaGaugeField::loadCPUField | ( | const cpuGaugeField & | cpu, |
| TimeProfile & | profile | ||
| ) |
Download into this field from a CPU field. Overloaded variant that includes profiling.
| [in] | cpu | The CPU field source |
| [in] | profile | Time profile to record the transfer |
Definition at line 640 of file cuda_gauge_field.cpp.
|
inlinevirtual |
Reimplemented from quda::GaugeField.
Definition at line 582 of file gauge_field.h.
|
inlinevirtual |
Reimplemented from quda::GaugeField.
Definition at line 586 of file gauge_field.h.
|
virtual |
If managed memory and prefetch is enabled, prefetch the gauge field and buffers to the CPU or the GPU.
| [in] | mem_space | Memory space we are prefetching to |
| [in] | stream | Which stream to run the prefetch in (default 0) |
Reimplemented from quda::LatticeField.
Definition at line 736 of file cuda_gauge_field.cpp.
| void quda::cudaGaugeField::recvStart | ( | int | dim, |
| int | dir | ||
| ) |
Start the receive communicators.
| [in] | dim | The communication dimension |
| [in] | dir | The communication direction (0=backwards, 1=forwards) |
Definition at line 304 of file cuda_gauge_field.cpp.
|
virtual |
Restores the cudaGaugeField to CUDA memory.
Reimplemented from quda::LatticeField.
Definition at line 728 of file cuda_gauge_field.cpp.
| void quda::cudaGaugeField::saveCPUField | ( | cpuGaugeField & | cpu | ) | const |
Upload from this field into a CPU field.
| [out] | cpu | The CPU field source |
Definition at line 646 of file cuda_gauge_field.cpp.
| void quda::cudaGaugeField::saveCPUField | ( | cpuGaugeField & | cpu, |
| TimeProfile & | profile | ||
| ) | const |
Upload from this field into a CPU field. Overloaded variant that includes profiling.
| [out] | cpu | The CPU field source |
| [in] | profile | Time profile to record the transfer |
Definition at line 715 of file cuda_gauge_field.cpp.
| void quda::cudaGaugeField::sendStart | ( | int | dim, |
| int | dir, | ||
| qudaStream_t * | stream_p = nullptr |
||
| ) |
Start the sending communicators.
| [in] | dim | The communication dimension |
| [in] | dir | The communication direction (0=backwards, 1=forwards) |
| [in] | stream_p | Pointer to CUDA stream to post the communication in (if 0, then use null stream) |
Definition at line 329 of file cuda_gauge_field.cpp.
| void quda::cudaGaugeField::setGauge | ( | void * | _gauge | ) |
Definition at line 483 of file cuda_gauge_field.cpp.
|
virtual |
Set all field elements to zero
Implements quda::GaugeField.
Definition at line 751 of file cuda_gauge_field.cpp.