3#ifndef TETL_RANDOM_XORSHIFT128PLUS_HPP
4#define TETL_RANDOM_XORSHIFT128PLUS_HPP
34 constexpr auto discard(
unsigned long long z)
noexcept ->
void
36 for (
auto i{0ULL}; i < z; ++i) {
43 uint32_t const result = _state[0] + _state[3];
46 _state[2] ^= _state[0];
47 _state[3] ^= _state[1];
48 _state[1] ^= _state[2];
49 _state[0] ^= _state[3];
52 _state[3] =
rotl(_state[3], 11);
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
friend constexpr auto operator==(xoshiro128plus const &lhs, xoshiro128plus const &rhs) noexcept -> bool
Definition xoshiro128plus.hpp:57
constexpr auto seed(result_type value=default_seed) noexcept -> void
Definition xoshiro128plus.hpp:32
constexpr xoshiro128plus(result_type seed) noexcept
Definition xoshiro128plus.hpp:23
constexpr auto discard(unsigned long long z) noexcept -> void
Definition xoshiro128plus.hpp:34
constexpr xoshiro128plus()=default
uint32_t result_type
Definition xoshiro128plus.hpp:18
static constexpr auto max() noexcept -> result_type
Definition xoshiro128plus.hpp:30
static constexpr auto min() noexcept -> result_type
Definition xoshiro128plus.hpp:28
constexpr auto operator()() noexcept -> result_type
Definition xoshiro128plus.hpp:41
static constexpr auto default_seed
Definition xoshiro128plus.hpp:19