26#if defined(JPL_COMPILER_MSVC) and (JPL_CPU_ADDRESS_BITS == 64)
43 static constexpr result_type max() {
return std::numeric_limits<result_type>::max(); }
47 State += 0xa0761d6478bd642full;
48 return wymum(
State,
State ^ 0xe7037ed1a0b428dbull);
54#if defined(JPL_COMPILER_MSVC) and (JPL_CPU_ADDRESS_BITS == 64)
56#if defined(JPL_CPU_X86)
59 const uint64 low = _umul128(a, b, &high);
62#elif defined(JPL_CPU_ARM)
64 const uint64 high = __umulh(a, b);
69#Error "Unsupported CPU architecture."
72#elif defined(__SIZEOF_INT128__)
73 const __uint128_t p =
static_cast<__uint128_t
>(a) * b;
74 return static_cast<uint64>(p >> 64) ^
static_cast<uint64>(p);
83 const uint64 p00 = a0 * b0;
84 const uint64 p01 = a0 * b1;
85 const uint64 p10 = a1 * b0;
86 const uint64 p11 = a1 * b1;
88 const uint64 middle = (p00 >> 32) +
static_cast<uint32>(p01) +
static_cast<uint32>(p10);
91 (p00 & 0xffffffffull) | (middle << 32);
94 p11 + (p01 >> 32) + (p10 >> 32) + (middle >> 32);
110 static constexpr result_type max() {
return std::numeric_limits<result_type>::max(); }
115 z = (z ^ (z >> 30)) * 0xbf58476d1ce4e5b9ull;
116 z = (z ^ (z >> 27)) * 0x94d049bb133111ebull;
117 return z ^ (z >> 31);
Definition AcousticMaterial.h:36
std::uint32_t uint32
Definition Core.h:311
std::uint64_t uint64
Definition Core.h:312
result_type operator()() noexcept
Definition Random.h:112
uint64 result_type
Definition Random.h:103
uint64 State
Definition Random.h:105
static constexpr result_type max()
Definition Random.h:110
static constexpr result_type min()
Definition Random.h:109
SplitMix64(uint64 seed)
Definition Random.h:107
static constexpr result_type max()
Definition Random.h:43
static constexpr result_type min()
Definition Random.h:42
WyRand(uint64 seed) noexcept
Definition Random.h:38
result_type operator()() noexcept
Definition Random.h:45
uint64 result_type
Definition Random.h:34
uint64 State
Definition Random.h:36