20#include <Random123/philox.h>
34 explicit PhiloxRng(std::uint32_t seed, std::uint32_t key_hi = 0xBEEFCAFE,
35 std::uint32_t ctr1 = 0)
36 : key_{{seed, key_hi}}, ctr_{{0, ctr1, 0, 0}} {}
40 buf_ = rng_(ctr_, key_);
45 return buf_[idx_++] * (1.0 / 4294967296.0);
51 r123::Philox4x32 rng_;
52 r123::Philox4x32::key_type key_;
53 r123::Philox4x32::ctr_type ctr_;
54 r123::Philox4x32::ctr_type buf_{};
Definition philox_rng.hpp:26
PhiloxRng(std::uint32_t seed, std::uint32_t key_hi=0xBEEFCAFE, std::uint32_t ctr1=0)
Definition philox_rng.hpp:34
double uniform(double lo, double hi)
Definition philox_rng.hpp:48
double uniform()
Definition philox_rng.hpp:38
Definition math_utils.hpp:12