8#include "../rapid/numeric_array.hpp"
12namespace hi::inline
v1 {
23 [[nodiscard]]
constexpr explicit xorshift128p(
u64x2 new_state) noexcept : _state(new_state) {}
27 while (_state.x() == 0 or _state.y() == 0) {
33 [[nodiscard]] T next()
noexcept;
38 [[nodiscard]] uint64_t
next() noexcept
74 hilet tmp = s ^ t ^ (t >> 26);
78 t = insert<0, 1>(t, tmp);
92 [[nodiscard]]
u32x4 next() noexcept
94 return bit_cast<u32x4>(next<u64x2>());
98 [[nodiscard]] i32x4 next() noexcept
100 return bit_cast<i32x4>(next<u64x2>());
104 [[nodiscard]] i16x8
next() noexcept
106 return bit_cast<i16x8>(next<u64x2>());
Cryptographically secure entropy.
Utilities used by the HikoGUI library itself.
#define hilet
Invariant should be the default for variables.
Definition utility.hpp:23
DOXYGEN BUG.
Definition algorithm.hpp:15
Randomly generate an object.
Definition seed.hpp:35
xorshift128+
Definition xorshift128p.hpp:16
uint64_t next() noexcept
Get the next 64 bit of random value.
Definition xorshift128p.hpp:38
u64x2 next() noexcept
Get next 128 bit of random value.
Definition xorshift128p.hpp:58