10 double normCpu(
const cpuColorSpinorField &b);
11 double normCuda(
const cudaColorSpinorField &b);
23 v(0),
norm(0), even(0), odd(0)
31 v(0),
norm(0), even(0), odd(0)
58 int x5 =
nDim == 5 ?
x[4] : 1;
59 for (
int i=0; i<dims; i++) {
63 for (
int j=0; j<dims; j++) {
82 printfQuda(
"face %d = %6d commDimPartitioned = %6d ghostOffset = %6d ghostNormOffset = %6d\n",
86 int ghostNormVolume = num_norm_faces * ghostVolume;
87 ghostVolume *= num_faces;
90 printfQuda(
"Allocated ghost volume = %d, ghost norm volume %d\n", ghostVolume, ghostNormVolume);
118 for(
int i=0; i<dims; ++i){
129 void ColorSpinorField::create(
int Ndim,
const int *
X,
int Nc,
int Ns,
QudaTwistFlavorType Twistflavor,
139 errorQuda(
"Number of dimensions nDim = %d too great", Ndim);
148 for (
int d=0; d<
nDim; d++) {
179 void ColorSpinorField::destroy() {
200 if (param.
nDim != 0) nDim = param.
nDim;
203 for (
int d=0; d<
nDim; d++) {
204 if (param.
x[0] != 0)
x[d] = param.
x[d];
238 if (!
init)
errorQuda(
"Shouldn't be resetting a non-inited field\n");
242 std::cout << *
this << std::endl;
319 rtn =
normCuda(dynamic_cast<const cudaColorSpinorField&>(a));
321 rtn =
normCpu(dynamic_cast<const cpuColorSpinorField&>(a));
323 errorQuda(
"Unknown input ColorSpinorField %s",
typeid(a).name());
330 out <<
"typdid = " <<
typeid(a).name() << std::endl;
331 out <<
"nColor = " << a.
nColor << std::endl;
332 out <<
"nSpin = " << a.
nSpin << std::endl;
333 out <<
"twistFlavor = " << a.
twistFlavor << std::endl;
334 out <<
"nDim = " << a.
nDim << std::endl;
335 for (
int d=0; d<a.
nDim; d++) out <<
"x[" << d <<
"] = " << a.
x[d] << std::endl;
336 out <<
"volume = " << a.
volume << std::endl;
337 out <<
"precision = " << a.
precision << std::endl;
338 out <<
"pad = " << a.
pad << std::endl;
339 out <<
"stride = " << a.
stride << std::endl;
340 out <<
"real_length = " << a.
real_length << std::endl;
341 out <<
"length = " << a.
length << std::endl;
342 out <<
"ghost_length = " << a.
ghost_length << std::endl;
343 out <<
"total_length = " << a.
total_length << std::endl;
346 out <<
"bytes = " << a.
bytes << std::endl;
347 out <<
"norm_bytes = " << a.
norm_bytes << std::endl;
348 out <<
"siteSubset = " << a.
siteSubset << std::endl;
349 out <<
"siteOrder = " << a.
siteOrder << std::endl;
350 out <<
"fieldOrder = " << a.
fieldOrder << std::endl;
351 out <<
"gammaBasis = " << a.
gammaBasis << std::endl;