7 #include "qdp_rannyu.h"
14 StandardOutputStream&
operator<<(StandardOutputStream& os,
const multi1d<int>&
d)
20 for(
int i=1;
i <
d.size(); ++
i)
36 unsigned int h01 = hash.
crc[0] | (hash.
crc[1] << 8);
37 unsigned int h23 = hash.
crc[2] | (hash.
crc[3] << 8);
38 unsigned int h45 = hash.
crc[4] | (hash.
crc[5] << 8);
40 seed[0] = h01 & 0xfff;
44 seed[1] = h23 & 0xfff;
48 seed[2] = h45 & 0xfff;
49 seed[3] = (h45 >> 12);
57 multi1d<int> stringToSeed(
const std::string& output)
64 return hashToSeed(crc);
70 Complex z4rng(RANNYU::RNGState_t& rng)
75 Real theta = twopiN * floor(4*rng.ran);
77 return cmplx(cos(theta),sin(theta));
87 ensemble(ensemble_), seqno(sequence_label_), decay_dir(decay_dir_)
91 QDPIO::cerr << __func__ <<
": only support decay_dir = Nd-1\n";
96 BinaryBufferWriter bin;
101 RANNYU::RNGState_t rng;
102 rng.seed = stringToSeed(bin.str());
106 for(
int i=0;
i < 10; ++
i)
129 BinaryBufferWriter bin;
137 RANNYU::RNGState_t rng;
138 rng.seed = stringToSeed(bin.str());
141 for(
int i=0;
i < 20; ++
i)
147 multi2d<Complex>
eta(Lt,
info.num_vecs);
149 for(
int t=0;
t < Lt; ++
t)
151 for(
int i=0;
i <
info.num_vecs; ++
i)
153 eta(
t,
i) = z4rng(rng);
virtual int getTime(int t_slice) const
Convenience - get shifted time.
DistillutionNoise(const std::string &ensemble, const std::string &sequence_label, int decay_dir)
Default constructor.
virtual multi2d< Complex > getRNG(const DistQuarkLines_t &info) const
Return the RN-s needed for this line.
Support for distillution - random time-slices and quark line noises.
void write(XMLWriter &xml, const std::string &path, const AsqtadFermActParams ¶m)
Writer parameters.
void initCRC48(CRC48_t &acc)
void calcCRC48(CRC48_t &acc, const void *dataPtr, int count)
Asqtad Staggered-Dirac operator.
QDP::StandardOutputStream & operator<<(QDP::StandardOutputStream &s, const multi1d< int > &d)
CRCBASETYPE crc[CRCARRAYSIZE]