5#include <Common/primitive_type.h>
17template<CURBG URBG1, CURBG URBG2 = URBG1>
21 std::is_same_v<typename URBG1::BitsType, uint32> ||
22 std::is_same_v<typename URBG1::BitsType, uint64>,
23 "URBG1 must have `uint32` or `uint64` bits type.");
26 std::is_same_v<typename URBG2::BitsType, uint32> ||
27 std::is_same_v<typename URBG2::BitsType, uint64>,
28 "URBG2 must have `uint32` or `uint64` bits type.");
43template<CURBG URBG1, CURBG URBG2>
45 : m_urbg1(
std::move(urbg1))
46 , m_urbg2(
std::move(urbg2))
49template<CURBG URBG1, CURBG URBG2>
55 const auto higher4B = uint64(m_urbg1.template generate<uint32>()) << 32;
56 const auto lower4B = uint64(m_urbg2.template generate<uint32>());
57 return higher4B | lower4B;
60template<CURBG URBG1, CURBG URBG2>
63 m_urbg1.jumpAhead(distance);
64 m_urbg2.jumpAhead(distance);
Combining two 32-bit RNGs to form a new 64-bit RNG. If any of the input RNG is not a 32-bit type,...
Definition TUrbg32x2.h:19
uint64 impl_generate()
Definition TUrbg32x2.h:50
PH_DEFINE_INLINE_RULE_OF_5_MEMBERS(TUrbg32x2)
TUrbg32x2(URBG1 urbg1, URBG2 urbg2)
Definition TUrbg32x2.h:44
void impl_jumpAhead(uint64 distance)
Definition TUrbg32x2.h:61
Math functions and utilities.
Definition TransformInfo.h:10