mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
added code to the noise module...
This commit is contained in:
parent
a8f3a111a5
commit
293bfe17d1
@ -119,8 +119,6 @@ void TNoises<FImpl>::execute(void)
|
|||||||
UniqueIdentifier.append( std::to_string( vm().getTrajectory() ) );
|
UniqueIdentifier.append( std::to_string( vm().getTrajectory() ) );
|
||||||
|
|
||||||
// We use our own seeds so we can specify different noises per quark
|
// We use our own seeds so we can specify different noises per quark
|
||||||
GridSerialRNG sRNG;
|
|
||||||
sRNG.SeedUniqueString(UniqueIdentifier);
|
|
||||||
Real rn;
|
Real rn;
|
||||||
auto &noise = envGet(NoiseTensor, getName());
|
auto &noise = envGet(NoiseTensor, getName());
|
||||||
for (int inoise = 0; inoise < nnoise; inoise++) {
|
for (int inoise = 0; inoise < nnoise; inoise++) {
|
||||||
@ -130,7 +128,7 @@ void TNoises<FImpl>::execute(void)
|
|||||||
if (exact_distillation)
|
if (exact_distillation)
|
||||||
noise(inoise, t, ivec, is) = 1.;
|
noise(inoise, t, ivec, is) = 1.;
|
||||||
else{
|
else{
|
||||||
random(sRNG,rn);
|
random(rngSerial(),rn);
|
||||||
// We could use a greater number of complex roots of unity
|
// We could use a greater number of complex roots of unity
|
||||||
// ... but this seems to work well
|
// ... but this seems to work well
|
||||||
noise(inoise, t, ivec, is) = (rn > 0.5) ? -1 : 1;
|
noise(inoise, t, ivec, is) = (rn > 0.5) ? -1 : 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user