3#ifndef TETL_RANDOM_XORSHIFT128STARSTAR_HPP
4#define TETL_RANDOM_XORSHIFT128STARSTAR_HPP
34 constexpr auto discard(
unsigned long long z)
noexcept ->
void
36 for (
auto i{0ULL}; i < z; ++i) {
46 _state[2] ^= _state[0];
47 _state[3] ^= _state[1];
48 _state[1] ^= _state[2];
49 _state[0] ^= _state[3];
53 _state[3] =
rotl(_state[3], 11);
58 [[nodiscard]]
friend constexpr auto
64 [[nodiscard]]
friend constexpr auto
constexpr auto equal(InputIt1 first1, InputIt1 last1, InputIt2 first2, Predicate p) -> bool
Returns true if the range [first1, last1) is equal to the range [first2, first2 + (last1 - first1)),...
Definition equal.hpp:18
constexpr auto rotl(UInt t, int s) noexcept -> UInt
Computes the result of bitwise left-rotating the value of x by s positions. This operation is also kn...
Definition rotl.hpp:16
constexpr auto end(C &c) -> decltype(c.end())
Returns an iterator to the end (i.e. the element after the last element) of the given container c or ...
Definition end.hpp:14
constexpr auto begin(C &c) -> decltype(c.begin())
Returns an iterator to the beginning of the given container c or array array. These templates rely on...
Definition begin.hpp:20
Definition adjacent_find.hpp:8
TETL_BUILTIN_UINT32 uint32_t
Unsigned integer type with width of exactly 32 bits.
Definition uint_t.hpp:17
static constexpr auto max() noexcept
Definition numeric_limits.hpp:21
static constexpr auto min() noexcept
Definition numeric_limits.hpp:20
constexpr auto seed(result_type value=default_seed) noexcept -> void
Definition xoshiro128starstar.hpp:32
constexpr auto discard(unsigned long long z) noexcept -> void
Definition xoshiro128starstar.hpp:34
constexpr xoshiro128starstar()=default
uint32_t result_type
Definition xoshiro128starstar.hpp:18
friend constexpr auto operator==(xoshiro128starstar const &lhs, xoshiro128starstar const &rhs) noexcept -> bool
Definition xoshiro128starstar.hpp:59
static constexpr auto max() noexcept -> result_type
Definition xoshiro128starstar.hpp:30
constexpr xoshiro128starstar(result_type seed) noexcept
Definition xoshiro128starstar.hpp:23
static constexpr auto min() noexcept -> result_type
Definition xoshiro128starstar.hpp:28
constexpr auto operator()() noexcept -> result_type
Definition xoshiro128starstar.hpp:41
friend constexpr auto operator!=(xoshiro128starstar const &lhs, xoshiro128starstar const &rhs) noexcept -> bool
Definition xoshiro128starstar.hpp:65
static constexpr auto default_seed
Definition xoshiro128starstar.hpp:19