QUDA
v0.7.0
A library for QCD on GPUs
|
#include <color_spinor_field.h>
Public Member Functions | |
cudaColorSpinorField (const cudaColorSpinorField &) | |
cudaColorSpinorField (const ColorSpinorField &, const ColorSpinorParam &) | |
cudaColorSpinorField (const ColorSpinorField &) | |
cudaColorSpinorField (const ColorSpinorParam &) | |
virtual | ~cudaColorSpinorField () |
ColorSpinorField & | operator= (const ColorSpinorField &) |
cudaColorSpinorField & | operator= (const cudaColorSpinorField &) |
cudaColorSpinorField & | operator= (const cpuColorSpinorField &) |
void | switchBufferPinned () |
void | createComms (int nFace) |
void | destroyComms () |
void | allocateGhostBuffer (int nFace) |
void | packGhost (const int nFace, const QudaParity parity, const int dim, const QudaDirection dir, const int dagger, cudaStream_t *stream, void *buffer=0, double a=0, double b=0) |
void | packGhostExtended (const int nFace, const int R[], const QudaParity parity, const int dim, const QudaDirection dir, const int dagger, cudaStream_t *stream, void *buffer=0) |
void | packGhost (FullClover &clov, FullClover &clovInv, const int nFace, const QudaParity parity, const int dim, const QudaDirection dir, const int dagger, cudaStream_t *stream, void *buffer=0, double a=0) |
void | sendGhost (void *ghost_spinor, const int nFace, const int dim, const QudaDirection dir, const int dagger, cudaStream_t *stream) |
void | unpackGhost (const void *ghost_spinor, const int nFace, const int dim, const QudaDirection dir, const int dagger, cudaStream_t *stream) |
void | unpackGhostExtended (const void *ghost_spinor, const int nFace, const QudaParity parity, const int dim, const QudaDirection dir, const int dagger, cudaStream_t *stream) |
void | streamInit (cudaStream_t *stream_p) |
void | pack (int nFace, int parity, int dagger, int stream_idx, bool zeroCopyPack, double a=0, double b=0) |
void | pack (FullClover &clov, FullClover &clovInv, int nFace, int parity, int dagger, int stream_idx, bool zeroCopyPack, double a=0) |
void | pack (int nFace, int parity, int dagger, cudaStream_t *stream_p, bool zeroCopyPack, double a=0, double b=0) |
void | pack (FullClover &clov, FullClover &clovInv, int nFace, int parity, int dagger, cudaStream_t *stream_p, bool zeroCopyPack, double a=0) |
void | packExtended (const int nFace, const int R[], const int parity, const int dagger, const int dim, cudaStream_t *stream_p, const bool zeroCopyPack=false) |
void | gather (int nFace, int dagger, int dir, cudaStream_t *stream_p=NULL) |
void | recvStart (int nFace, int dir, int dagger=0) |
void | sendStart (int nFace, int dir, int dagger=0) |
void | commsStart (int nFace, int dir, int dagger=0) |
int | commsQuery (int nFace, int dir, int dagger=0) |
void | scatter (int nFace, int dagger, int dir, cudaStream_t *stream_p) |
void | scatter (int nFace, int dagger, int dir) |
void | scatterExtended (int nFace, int parity, int dagger, int dir) |
cudaColorSpinorField & | Even () const |
cudaColorSpinorField & | Odd () const |
cudaColorSpinorField & | Eigenvec (const int idx) const |
for deflated solvers: More... | |
void | CopyEigenvecSubset (cudaColorSpinorField &dst, const int range, const int first_element=0) const |
void | zero () |
QudaFieldLocation | Location () const |
bool | isNative () const |
void | getTexObjectInfo () const |
![]() | |
ColorSpinorField (const ColorSpinorField &) | |
ColorSpinorField (const ColorSpinorParam &) | |
virtual | ~ColorSpinorField () |
QudaPrecision | Precision () const |
int | Ncolor () const |
int | Nspin () const |
QudaTwistFlavorType | TwistFlavor () const |
int | Ndim () const |
const int * | X () const |
int | X (int d) const |
int | RealLength () const |
int | Length () const |
int | TotalLength () const |
int | Stride () const |
int | Volume () const |
int | VolumeCB () const |
int | Pad () const |
size_t | Bytes () const |
size_t | NormBytes () const |
void | PrintDims () const |
const char * | AuxString () const |
void * | V () |
const void * | V () const |
void * | Norm () |
const void * | Norm () const |
int | EigvDim () const |
for eigcg only: More... | |
int | EigvId () const |
int | EigvVolume () const |
int | EigvStride () const |
int | EigvLength () const |
int | EigvRealLength () const |
int | EigvTotalLength () const |
size_t | EigvBytes () const |
size_t | EigvNormBytes () const |
int | EigvGhostLength () const |
QudaDWFPCType | DWFPCtype () const |
QudaSiteSubset | SiteSubset () const |
QudaSiteOrder | SiteOrder () const |
QudaFieldOrder | FieldOrder () const |
QudaGammaBasis | GammaBasis () const |
int | GhostLength () const |
const int * | GhostFace () const |
int | GhostOffset (const int i) const |
int | GhostNormOffset (const int i) const |
void * | Ghost (const int i) |
const void * | Ghost (const int i) const |
void * | GhostNorm (const int i) |
const void * | GhostNorm (const int i) const |
![]() | |
LatticeField (const LatticeFieldParam ¶m) | |
virtual | ~LatticeField () |
int | Ndim () const |
const int * | X () const |
int | Volume () const |
int | VolumeCB () const |
const int * | SurfaceCB () const |
int | SurfaceCB (const int i) const |
int | Stride () const |
int | Pad () const |
int | Nvec () const |
QudaPrecision | Precision () const |
QudaFieldLocation | Location () const |
size_t | GBytes () const |
void | checkField (const LatticeField &) |
const char * | VolString () const |
Static Public Member Functions | |
static void | freeGhostBuffer (void) |
![]() | |
static void | freeBuffer (int index=0) |
Static Public Attributes | |
static int | bufferIndex = 0 |
Friends | |
class | cpuColorSpinorField |
std::ostream & | operator<< (std::ostream &out, const cudaColorSpinorField &) |
Definition at line 302 of file color_spinor_field.h.
quda::cudaColorSpinorField::cudaColorSpinorField | ( | const cudaColorSpinorField & | src | ) |
Definition at line 60 of file cuda_color_spinor_field.cu.
quda::cudaColorSpinorField::cudaColorSpinorField | ( | const ColorSpinorField & | src, |
const ColorSpinorParam & | param | ||
) |
Definition at line 68 of file cuda_color_spinor_field.cu.
quda::cudaColorSpinorField::cudaColorSpinorField | ( | const ColorSpinorField & | src | ) |
Definition at line 123 of file cuda_color_spinor_field.cu.
quda::cudaColorSpinorField::cudaColorSpinorField | ( | const ColorSpinorParam & | param | ) |
Definition at line 36 of file cuda_color_spinor_field.cu.
|
virtual |
Definition at line 166 of file cuda_color_spinor_field.cu.
void quda::cudaColorSpinorField::allocateGhostBuffer | ( | int | nFace | ) |
Definition at line 539 of file cuda_color_spinor_field.cu.
|
virtual |
Reimplemented from quda::LatticeField.
Definition at line 1291 of file cuda_color_spinor_field.cu.
|
virtual |
Reimplemented from quda::LatticeField.
Definition at line 1259 of file cuda_color_spinor_field.cu.
void quda::cudaColorSpinorField::CopyEigenvecSubset | ( | cudaColorSpinorField & | dst, |
const int | range, | ||
const int | first_element = 0 |
||
) | const |
Definition at line 1393 of file cuda_color_spinor_field.cu.
void quda::cudaColorSpinorField::createComms | ( | int | nFace | ) |
Create the communication handlers and buffers
Definition at line 818 of file cuda_color_spinor_field.cu.
void quda::cudaColorSpinorField::destroyComms | ( | ) |
Destroy the communication handlers and buffers
Definition at line 1067 of file cuda_color_spinor_field.cu.
cudaColorSpinorField & quda::cudaColorSpinorField::Eigenvec | ( | const int | idx | ) | const |
for deflated solvers:
Definition at line 1378 of file cuda_color_spinor_field.cu.
cudaColorSpinorField & quda::cudaColorSpinorField::Even | ( | ) | const |
Definition at line 394 of file cuda_color_spinor_field.cu.
|
static |
Definition at line 584 of file cuda_color_spinor_field.cu.
|
virtual |
Reimplemented from quda::LatticeField.
Definition at line 1196 of file cuda_color_spinor_field.cu.
void quda::cudaColorSpinorField::getTexObjectInfo | ( | ) | const |
Definition at line 1453 of file cuda_color_spinor_field.cu.
bool quda::cudaColorSpinorField::isNative | ( | ) | const |
This function returns true if the field is stored in an internal field order, given the precision and the length of the spin dimension.
Definition at line 171 of file cuda_color_spinor_field.cu.
|
virtual |
Implements quda::ColorSpinorField.
Definition at line 1366 of file cuda_color_spinor_field.cu.
cudaColorSpinorField & quda::cudaColorSpinorField::Odd | ( | ) | const |
Definition at line 403 of file cuda_color_spinor_field.cu.
|
virtual |
Reimplemented from quda::ColorSpinorField.
Definition at line 130 of file cuda_color_spinor_field.cu.
cudaColorSpinorField & quda::cudaColorSpinorField::operator= | ( | const cudaColorSpinorField & | src | ) |
Definition at line 141 of file cuda_color_spinor_field.cu.
cudaColorSpinorField & quda::cudaColorSpinorField::operator= | ( | const cpuColorSpinorField & | src | ) |
Definition at line 155 of file cuda_color_spinor_field.cu.
void quda::cudaColorSpinorField::pack | ( | int | nFace, |
int | parity, | ||
int | dagger, | ||
int | stream_idx, | ||
bool | zeroCopyPack, | ||
double | a = 0 , |
||
double | b = 0 |
||
) |
Definition at line 1160 of file cuda_color_spinor_field.cu.
void quda::cudaColorSpinorField::pack | ( | FullClover & | clov, |
FullClover & | clovInv, | ||
int | nFace, | ||
int | parity, | ||
int | dagger, | ||
int | stream_idx, | ||
bool | zeroCopyPack, | ||
double | a = 0 |
||
) |
|
virtual |
Reimplemented from quda::LatticeField.
Definition at line 1142 of file cuda_color_spinor_field.cu.
void quda::cudaColorSpinorField::pack | ( | FullClover & | clov, |
FullClover & | clovInv, | ||
int | nFace, | ||
int | parity, | ||
int | dagger, | ||
cudaStream_t * | stream_p, | ||
bool | zeroCopyPack, | ||
double | a = 0 |
||
) |
void quda::cudaColorSpinorField::packExtended | ( | const int | nFace, |
const int | R[], | ||
const int | parity, | ||
const int | dagger, | ||
const int | dim, | ||
cudaStream_t * | stream_p, | ||
const bool | zeroCopyPack = false |
||
) |
Definition at line 1176 of file cuda_color_spinor_field.cu.
void quda::cudaColorSpinorField::packGhost | ( | const int | nFace, |
const QudaParity | parity, | ||
const int | dim, | ||
const QudaDirection | dir, | ||
const int | dagger, | ||
cudaStream_t * | stream, | ||
void * | buffer = 0 , |
||
double | a = 0 , |
||
double | b = 0 |
||
) |
Packs the cudaColorSpinorField's ghost zone
nFace | How many faces to pack (depth) |
parity | Parity of the field |
dim | Labels space-time dimensions |
dir | Pack data to send in forward of backward directions, or both |
dagger | Whether the operator is the Hermitian conjugate or not |
stream | Which stream to use for the kernel |
buffer | Optional parameter where the ghost should be stored (default is to use cudaColorSpinorField::ghostFaceBuffer) |
a | Twisted mass parameter (default=0) |
b | Twisted mass parameter (default=0) |
Definition at line 601 of file cuda_color_spinor_field.cu.
void quda::cudaColorSpinorField::packGhost | ( | FullClover & | clov, |
FullClover & | clovInv, | ||
const int | nFace, | ||
const QudaParity | parity, | ||
const int | dim, | ||
const QudaDirection | dir, | ||
const int | dagger, | ||
cudaStream_t * | stream, | ||
void * | buffer = 0 , |
||
double | a = 0 |
||
) |
void quda::cudaColorSpinorField::packGhostExtended | ( | const int | nFace, |
const int | R[], | ||
const QudaParity | parity, | ||
const int | dim, | ||
const QudaDirection | dir, | ||
const int | dagger, | ||
cudaStream_t * | stream, | ||
void * | buffer = 0 |
||
) |
Definition at line 760 of file cuda_color_spinor_field.cu.
void quda::cudaColorSpinorField::recvStart | ( | int | nFace, |
int | dir, | ||
int | dagger = 0 |
||
) |
Definition at line 1213 of file cuda_color_spinor_field.cu.
void quda::cudaColorSpinorField::scatter | ( | int | nFace, |
int | dagger, | ||
int | dir, | ||
cudaStream_t * | stream_p | ||
) |
Definition at line 1324 of file cuda_color_spinor_field.cu.
|
virtual |
Reimplemented from quda::LatticeField.
Definition at line 1339 of file cuda_color_spinor_field.cu.
void quda::cudaColorSpinorField::scatterExtended | ( | int | nFace, |
int | parity, | ||
int | dagger, | ||
int | dir | ||
) |
Definition at line 1353 of file cuda_color_spinor_field.cu.
void quda::cudaColorSpinorField::sendGhost | ( | void * | ghost_spinor, |
const int | nFace, | ||
const int | dim, | ||
const QudaDirection | dir, | ||
const int | dagger, | ||
cudaStream_t * | stream | ||
) |
Initiate the gpu to cpu send of the ghost zone (halo)
ghost_spinor | Where to send the ghost zone |
nFace | Number of face to send |
dim | The lattice dimension we are sending |
dir | The direction (QUDA_BACKWARDS or QUDA_FORWARDS) |
dagger | Whether the operator is daggerer or not |
stream | The array of streams to use |
Definition at line 624 of file cuda_color_spinor_field.cu.
void quda::cudaColorSpinorField::sendStart | ( | int | nFace, |
int | dir, | ||
int | dagger = 0 |
||
) |
Definition at line 1237 of file cuda_color_spinor_field.cu.
void quda::cudaColorSpinorField::streamInit | ( | cudaStream_t * | stream_p | ) |
Definition at line 1138 of file cuda_color_spinor_field.cu.
void quda::cudaColorSpinorField::switchBufferPinned | ( | ) |
void quda::cudaColorSpinorField::unpackGhost | ( | const void * | ghost_spinor, |
const int | nFace, | ||
const int | dim, | ||
const QudaDirection | dir, | ||
const int | dagger, | ||
cudaStream_t * | stream | ||
) |
Initiate the cpu to gpu send of the ghost zone (halo)
ghost_spinor | Source of the ghost zone |
nFace | Number of face to send |
dim | The lattice dimension we are sending |
dir | The direction (QUDA_BACKWARDS or QUDA_FORWARDS) |
dagger | Whether the operator is daggerer or not |
stream | The array of streams to use |
Definition at line 728 of file cuda_color_spinor_field.cu.
void quda::cudaColorSpinorField::unpackGhostExtended | ( | const void * | ghost_spinor, |
const int | nFace, | ||
const QudaParity | parity, | ||
const int | dim, | ||
const QudaDirection | dir, | ||
const int | dagger, | ||
cudaStream_t * | stream | ||
) |
Initiate the cpu to gpu copy of the extended border region
ghost_spinor | Source of the ghost zone |
parity | Parity of the field |
nFace | Number of face to send |
dim | The lattice dimension we are sending |
dir | The direction (QUDA_BACKWARDS or QUDA_FORWARDS) |
dagger | Whether the operator is daggered or not |
stream | The array of streams to use |
Definition at line 786 of file cuda_color_spinor_field.cu.
void quda::cudaColorSpinorField::zero | ( | ) |
Definition at line 414 of file cuda_color_spinor_field.cu.
|
friend |
Definition at line 304 of file color_spinor_field.h.
|
friend |
Definition at line 1368 of file cuda_color_spinor_field.cu.
|
static |
Definition at line 369 of file color_spinor_field.h.