30 #define rot32(x, k) (((x) << (k)) | ((x) >> (32 - (k))))
35 uint32_t a = 0, b = 0, c = 0, d = 0;
40 constexpr
Rand() =
default;
45 for(
size_t i = 0; i < 20; ++i)
69 constexpr
static uint32_t
max() {
70 return std::numeric_limits<uint32_t>::max();
75 constexpr
static uint32_t
min() {
76 return std::numeric_limits<uint32_t>::min();
80 uint32_t e = a -
rot32(b, 27);
90 for(int32_t i = n; i--; )
99 static thread_local
Rand local_generator(std::random_device{}());
100 return local_generator;
Thread safe random number generator.
constexpr static uint32_t initial_seed
constexpr static uint32_t max()
Obtains the maximum generable number.
constexpr Rand(Rand &&o) noexcept
constexpr void advance_n()
Rand & operator=(Rand &&) noexcept=default
constexpr Rand(Rand const &o) noexcept
Rand & operator=(Rand const &) noexcept=default
constexpr uint32_t operator()()
constexpr static uint32_t min()
Obtains the minimum generable number.
Rand & get_local_generator()