53 errorQuda(
"Unknown input ColorSpinorField %s",
typeid(src).name());
92 errorQuda(
"Unknown input ColorSpinorField %s",
typeid(src).name());
117 src.saveSpinorField(*
this);
165 param.is_composite =
false;
166 param.composite_dim = 0;
178 errorQuda(
"dual-parity fields should have double the size of a single-parity field (%lu,%lu,%lu)\n",
184 void cpuColorSpinorField::destroy() {
204 for (
int i=0; i<
x[
nDim-1]; i++) memcpy(((
void**)
v)[i], ((
void**)src.
v)[i],
bytes/
x[
nDim-1]);
287 for(
int i=0; i < 4; i++){
307 errorQuda(
"Full spinor is not supported in unpackGhost for cpu");
335 std::memcpy(buffer,
v,
bytes);
341 std::memcpy(
v, buffer,
bytes);
void exchange(void **ghost, void **sendbuf, int nFace=1) const
virtual ColorSpinorField & operator=(const ColorSpinorField &)
void * ghost_buf[2 *QUDA_MAX_DIM]
CompositeColorSpinorFieldDescriptor composite_descr
used for deflation eigenvector sets etc.:
QudaSiteSubset SiteSubset() const
void * ghost[2][QUDA_MAX_DIM]
void reset(const ColorSpinorParam &)
static void checkField(const ColorSpinorField &, const ColorSpinorField &)
QudaFieldOrder fieldOrder
friend class ColorSpinorParam
QudaSiteSubset siteSubset
int surfaceCB[QUDA_MAX_DIM]
virtual void copy_from_buffer(void *buffer)
Copy all contents of the field from a host buffer to this field.
static int initGhostFaceBuffer
void unpackGhost(void *ghost_spinor, const int dim, const QudaDirection dir, const int dagger)
virtual ~cpuColorSpinorField()
static void freeGhostBuffer(void)
void exchangeGhost(QudaParity parity, int nFace, int dagger, const MemoryLocation *pack_destination=nullptr, const MemoryLocation *halo_location=nullptr, bool gdr_send=false, bool gdr_recv=false, QudaPrecision ghost_precision=QUDA_INVALID_PRECISION) const
This is a unified ghost exchange function for doing a complete halo exchange regardless of the type o...
static size_t ghostFaceBytes[QUDA_MAX_DIM]
static void * fwdGhostFaceSendBuffer[QUDA_MAX_DIM]
virtual void copy_to_buffer(void *buffer) const
Copy all contents of the field to a host buffer.
void backup() const
Backs up the cpuColorSpinorField.
static void * fwdGhostFaceBuffer[QUDA_MAX_DIM]
void packGhost(void **ghost, const QudaParity parity, const int nFace, const int dagger) const
void restore() const
Restores the cpuColorSpinorField.
static void * backGhostFaceSendBuffer[QUDA_MAX_DIM]
void copy(const cpuColorSpinorField &)
ColorSpinorField & operator=(const ColorSpinorField &)
void Source(const QudaSourceType sourceType, const int st=0, const int s=0, const int c=0)
static int Compare(const cpuColorSpinorField &a, const cpuColorSpinorField &b, const int resolution=1)
Perform a component by component comparison of two color-spinor fields. In doing we normalize with re...
cpuColorSpinorField(const cpuColorSpinorField &)
static void * backGhostFaceBuffer[QUDA_MAX_DIM]
void PrintVector(unsigned int x) const
void allocateGhostBuffer(int nFace) const
Allocate the ghost buffers.
void * memset(void *s, int c, size_t n)
enum QudaPrecision_s QudaPrecision
@ QUDA_CPU_FIELD_LOCATION
enum QudaDirection_s QudaDirection
@ QUDA_PARITY_SITE_SUBSET
enum QudaFieldCreate_s QudaFieldCreate
enum QudaSourceType_s QudaSourceType
@ QUDA_SPACE_COLOR_SPIN_FIELD_ORDER
@ QUDA_QOP_DOMAIN_WALL_FIELD_ORDER
@ QUDA_QDPJIT_FIELD_ORDER
@ QUDA_PADDED_SPACE_SPIN_COLOR_FIELD_ORDER
@ QUDA_SPACE_SPIN_COLOR_FIELD_ORDER
@ QUDA_REFERENCE_FIELD_CREATE
enum QudaParity_s QudaParity
#define safe_malloc(size)
void init()
Create the BLAS context.
void genericPackGhost(void **ghost, const ColorSpinorField &a, QudaParity parity, int nFace, int dagger, MemoryLocation *destination=nullptr)
Generic ghost packing routine.
void copyGenericColorSpinor(ColorSpinorField &dst, const ColorSpinorField &src, QudaFieldLocation location, void *Dst=0, void *Src=0, void *dstNorm=0, void *srcNorm=0)
void genericPrintVector(const cpuColorSpinorField &a, unsigned int x)
void genericSource(cpuColorSpinorField &a, QudaSourceType sourceType, int x, int s, int c)
int genericCompare(const cpuColorSpinorField &a, const cpuColorSpinorField &b, int tol)
#define QUDA_MAX_DIM
Maximum number of dimensions supported by QUDA. In practice, no routines make use of more than 5.
#define ALIGNMENT_ADJUST(n)