10 double normCpu(
const cpuColorSpinorField &b);
11 double normCuda(
const cudaColorSpinorField &b);
41 static bool createSpinorGhost =
true;
46 if (!createSpinorGhost) {
70 #ifdef BUILD_TIFR_INTERFACE
86 int x5 =
nDim == 5 ?
x[4] : 1;
87 for (
int i=0; i<
dims; i++) {
91 for (
int j=0; j<
dims; j++) {
110 printfQuda(
"face %d = %6d commDimPartitioned = %6d ghostOffset = %6d ghostNormOffset = %6d\n",
114 int ghostNormVolume = num_norm_faces * ghostVolume;
115 ghostVolume *= num_faces;
118 printfQuda(
"Allocated ghost volume = %d, ghost norm volume %d\n", ghostVolume, ghostNormVolume);
146 void ColorSpinorField::create(
int Ndim,
const int *
X,
int Nc,
int Ns,
QudaTwistFlavorType Twistflavor,
156 errorQuda(
"Number of dimensions nDim = %d too great", Ndim);
167 eigv_id = (evdim == 0) ? -1: evid;
171 for (
int d=0; d<
nDim; d++) {
258 for (
int d=1; d<
nDim; d++) {
267 if (check < 0 || check >= aux_string_n)
errorQuda(
"Error writing aux string");
272 if (check < 0 || check >= aux_string_n)
errorQuda(
"Error writing aux string");
276 void ColorSpinorField::destroy() {
299 if (param.
nDim != 0) nDim = param.
nDim;
312 for (
int d=0; d<
nDim; d++) {
313 if (param.
x[0] != 0)
x[d] = param.
x[d];
401 errorQuda(
"\nIncorrect eigenvector index.\n");
405 if (!
init)
errorQuda(
"Shouldn't be resetting a non-inited field\n");
409 std::cout << *
this << std::endl;
490 rtn =
normCuda(dynamic_cast<const cudaColorSpinorField&>(a));
492 rtn =
normCpu(dynamic_cast<const cpuColorSpinorField&>(a));
494 errorQuda(
"Unknown input ColorSpinorField %s",
typeid(a).name());
501 out <<
"typedid = " <<
typeid(a).name() << std::endl;
502 out <<
"nColor = " << a.
nColor << std::endl;
503 out <<
"nSpin = " << a.
nSpin << std::endl;
504 out <<
"twistFlavor = " << a.
twistFlavor << std::endl;
505 out <<
"nDim = " << a.
nDim << std::endl;
506 for (
int d=0; d<a.
nDim; d++) out <<
"x[" << d <<
"] = " << a.
x[d] << std::endl;
507 out <<
"volume = " << a.
volume << std::endl;
508 out <<
"precision = " << a.
precision << std::endl;
509 out <<
"pad = " << a.
pad << std::endl;
510 out <<
"stride = " << a.
stride << std::endl;
511 out <<
"real_length = " << a.
real_length << std::endl;
512 out <<
"length = " << a.
length << std::endl;
513 out <<
"ghost_length = " << a.
ghost_length << std::endl;
514 out <<
"total_length = " << a.
total_length << std::endl;
517 out <<
"bytes = " << a.
bytes << std::endl;
518 out <<
"norm_bytes = " << a.
norm_bytes << std::endl;
519 out <<
"siteSubset = " << a.
siteSubset << std::endl;
520 out <<
"siteOrder = " << a.
siteOrder << std::endl;
521 out <<
"fieldOrder = " << a.
fieldOrder << std::endl;
522 out <<
"gammaBasis = " << a.
gammaBasis << std::endl;
523 out <<
"eigDim = " << a.
eigv_dim << std::endl;
524 out <<
"eigID = " << a.
eigv_id << std::endl;
525 out <<
"eigVolume = " << a.
eigv_volume << std::endl;
526 out <<
"eigStride = " << a.
eigv_stride << std::endl;
527 out <<
"eigLength = " << a.
eigv_length << std::endl;
528 out <<
"PC type = " << a.
PCtype << std::endl;
void setGhostSpinor(bool value)
QudaFieldOrder fieldOrder
enum QudaPrecision_s QudaPrecision
int commDimPartitioned(int dir)
__host__ __device__ ValueType norm(const complex< ValueType > &z)
Returns the magnitude of z squared.
int ghostFace[QUDA_MAX_DIM]
void * ghost[QUDA_MAX_DIM]
QudaVerbosity getVerbosity()
void * ghostNorm[QUDA_MAX_DIM]
char aux_tmp[TuneKey::aux_n]
enum QudaFieldOrder_s QudaFieldOrder
void fill(ColorSpinorParam &) const
int ghostOffset[QUDA_MAX_DIM]
virtual ~ColorSpinorField()
enum QudaSiteOrder_s QudaSiteOrder
QudaGammaBasis gammaBasis
int eigv_dim
used for eigcg:
QudaSiteSubset siteSubset
ColorSpinorField(const ColorSpinorField &)
std::ostream & operator<<(std::ostream &output, const CloverFieldParam ¶m)
enum QudaDWFPCType_s QudaDWFPCType
static void checkField(const ColorSpinorField &, const ColorSpinorField &)
void reset(const ColorSpinorParam &)
QudaFieldOrder fieldOrder
void clearGhostPointers()
#define ALIGNMENT_ADJUST(n)
void * GhostNorm(const int i)
QudaGammaBasis gammaBasis
int ghostNormOffset[QUDA_MAX_DIM]
double normCuda(const cudaColorSpinorField &b)
char vol_string[TuneKey::volume_n]
QudaTwistFlavorType twistFlavor
virtual ColorSpinorField & operator=(const ColorSpinorField &)
void * Ghost(const int i)
enum QudaSiteSubset_s QudaSiteSubset
int eigv_total_norm_length
int eigv_ghost_norm_length
char aux_string[TuneKey::aux_n]
cpuColorSpinorField * out
enum QudaGammaBasis_s QudaGammaBasis
QudaTwistFlavorType twistFlavor
double normCpu(const cpuColorSpinorField &b)
QudaTwistFlavorType TwistFlavor() const
void init(int argc, char **argv)
#define QUDA_MAX_DIM
Maximum number of dimensions supported by QUDA. In practice, no routines make use of more than 5...
static const int volume_n
double norm2(const ColorSpinorField &)
QudaSiteSubset siteSubset
enum QudaTwistFlavorType_s QudaTwistFlavorType