12 #ifndef SST_CORE_RNG_MERSENNE_H
13 #define SST_CORE_RNG_MERSENNE_H
20 #define MERSENNE_UINT32_MAX 4294967295U
21 #define MERSENNE_UINT64_MAX 18446744073709551615ULL
22 #define MERSENNE_INT32_MAX 2147483647L
23 #define MERSENNE_INT64_MAX 9223372036854775807LL
79 void seed(uint64_t newSeed);
90 void generateNextBatch();
106 #endif // SST_CORE_RNG_MERSENNE_H
Implements the base class for random number generators for the SST core.
Definition: rng.h:27
Implements a Mersenne-based RNG for use in the SST core or components.
Definition: mersenne.h:34
double nextUniform() override
Generates the next random number as a double value between 0 and 1.
Definition: mersenne.cc:72
int32_t generateNextInt32() override
Generates the next random number as a signed 32-bit integer.
Definition: mersenne.cc:132
uint64_t generateNextUInt64() override
Generates the next random number as an unsigned 64-bit integer.
Definition: mersenne.cc:99
void seed(uint64_t newSeed)
Seed the XOR RNG.
Definition: mersenne.cc:143
MersenneRNG()
Creates a new Mersenne using a random seed which is obtained from the system clock.
Definition: mersenne.cc:29
uint32_t generateNextUInt32() override
Generates the next random number as an unsigned 32-bit integer.
Definition: mersenne.cc:84
int64_t generateNextInt64() override
Generates the next random number as a signed 64-bit integer.
Definition: mersenne.cc:110
~MersenneRNG()
Destructor for Mersenne.
Definition: mersenne.cc:155