|
CNum 0.2.1
CPU-optimized ML library for C++
|
A global service for random number generation. More...
#include <RandUtils.h>
Static Public Member Functions | |
| static XoshiroCpp::Xoshiro256PlusPlus & | instance (uint64_t logical_id=0) |
| Get the instance of the RandomGenerator. | |
| static void | set_global_seed (uint64_t new_seed) |
| Set the seed for random number generation. | |
| static void | reset_state () |
| Reconstruct all thread local random generators. | |
A global service for random number generation.
The RandomGenerator class uses stateful logical-id based RNG streams. In order to ensure determinism, with this version of CNum's RNG implementation 2 threads cannot share an RNG associated with a logical id but can have their own RNGs associated with unique logical ids
|
static |
Get the instance of the RandomGenerator.
|
static |
Reconstruct all thread local random generators.
|
static |
Set the seed for random number generation.
| seed | The new seed |