1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-12-23 22:24:30 +00:00

Rework of RNG to use C++11 random. Should work correctly maintaining parallel RNG across

a machine. If a "fixedSeed" is used, randoms should be reproducible across different machine
decomposition since the generators are physically indexed and assigned in lexico ordering.
This commit is contained in:
Peter Boyle
2015-04-19 14:55:58 +01:00
parent 650410cb2f
commit a5b0c492d7
7 changed files with 191 additions and 55 deletions

View File

@@ -43,12 +43,14 @@ public:
_ostride.resize(_ndimension);
_istride.resize(_ndimension);
_osites = 1;
_isites = 1;
_fsites = _gsites = _osites = _isites = 1;
for(int d=0;d<_ndimension;d++){
_fdimensions[d] = dimensions[d]; // Global dimensions
_gdimensions[d] = _fdimensions[d]; // Global dimensions
_simd_layout[d] = simd_layout[d];
_fsites = _fsites * _fdimensions[d];
_gsites = _gsites * _gdimensions[d];
//FIXME check for exact division