mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Multiple RNGs
This commit is contained in:
parent
6af459cae4
commit
7e5faa0f34
@ -491,10 +491,15 @@ static inline void writeRNGState(GridSerialRNG &serial,GridParallelRNG ¶llel
|
|||||||
#ifdef RNG_RANLUX
|
#ifdef RNG_RANLUX
|
||||||
header.floating_point = std::string("UINT64");
|
header.floating_point = std::string("UINT64");
|
||||||
header.data_type = std::string("RANLUX48");
|
header.data_type = std::string("RANLUX48");
|
||||||
#else
|
#endif
|
||||||
|
#ifdef RNG_MT19937
|
||||||
header.floating_point = std::string("UINT32");
|
header.floating_point = std::string("UINT32");
|
||||||
header.data_type = std::string("MT19937");
|
header.data_type = std::string("MT19937");
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef RNG_SITMO
|
||||||
|
header.floating_point = std::string("UINT64");
|
||||||
|
header.data_type = std::string("SITMO");
|
||||||
|
#endif
|
||||||
|
|
||||||
truncate(file);
|
truncate(file);
|
||||||
offset = writeHeader(header,file);
|
offset = writeHeader(header,file);
|
||||||
@ -522,10 +527,15 @@ static inline void readRNGState(GridSerialRNG &serial,GridParallelRNG & parallel
|
|||||||
#ifdef RNG_RANLUX
|
#ifdef RNG_RANLUX
|
||||||
assert(format == std::string("UINT64"));
|
assert(format == std::string("UINT64"));
|
||||||
assert(data_type == std::string("RANLUX48"));
|
assert(data_type == std::string("RANLUX48"));
|
||||||
#else
|
#endif
|
||||||
|
#ifdef RNG_MT19937
|
||||||
assert(format == std::string("UINT32"));
|
assert(format == std::string("UINT32"));
|
||||||
assert(data_type == std::string("MT19937"));
|
assert(data_type == std::string("MT19937"));
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef RNG_SITMO
|
||||||
|
assert(format == std::string("UINT64"));
|
||||||
|
assert(data_type == std::string("SITMO"));
|
||||||
|
#endif
|
||||||
|
|
||||||
// depending on datatype, set up munger;
|
// depending on datatype, set up munger;
|
||||||
// munger is a function of <floating point, Real, data_type>
|
// munger is a function of <floating point, Real, data_type>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user