|
C(++)ECCO
C++ Error Control COding: a header-only library for ECC simulations and experiments, modeling complete coding systems across arbitrary finite fields and complex inter-field relationships - Christian Senger <senger@inue.uni-stuttgart.de>
|
Thread-local random number generator with shared seeding policy. More...
#include <helpers.hpp>
Static Public Member Functions | |
| static std::mt19937 & | get () |
| Get thread-local random number generator. | |
| static void | seed (uint32_t seed) |
| Set deterministic seed for all threads. | |
| static void | use_hardware_seed () |
| Enable hardware-based random seeding. | |
Thread-local random number generator with shared seeding policy.
Provides one std::mt19937 engine per thread. seed() selects deterministic seeding; use_hardware_seed() returns to seeding from std::random_device. A seed change is observed on the next call to get in each thread.
Definition at line 56 of file helpers.hpp.
|
inlinestatic |
Get thread-local random number generator.
Initializes the engine on first access. If the global seed generation changed since the previous access in this thread, reseeds before returning.
Definition at line 65 of file helpers.hpp.

|
inlinestatic |
Set deterministic seed for all threads.
| seed | Base seed value (combined with thread ID) |
Selects deterministic seeding. Each thread uses seed XOR its thread ID hash.
Definition at line 77 of file helpers.hpp.
|
inlinestatic |
Enable hardware-based random seeding.
Selects seeding from std::random_device.
Definition at line 88 of file helpers.hpp.