14 #include <type_traits>
48 std::uint32_t
const& seed,
49 std::uint32_t
const& subsequence = 0,
50 std::uint32_t
const&
offset = 0)
52 state((seed ^ subsequence) +
offset)
93 std::uint32_t
const& seed,
94 std::uint32_t
const& subsequence = 0,
95 std::uint32_t
const&
offset = 0)
97 state((seed ^ subsequence) +
offset)
128 std::random_device state;
157 namespace distribution::cpu
163 template<
typename TEngine>
166 return m_dist(engine);
170 std::normal_distribution<T> m_dist;
177 template<
typename TEngine>
180 return m_dist(engine);
184 std::uniform_real_distribution<T> m_dist;
191 template<
typename TEngine>
194 return m_dist(engine);
198 std::uniform_int_distribution<T> m_dist{
204 namespace distribution::trait
237 namespace engine::trait
245 std::uint32_t
const& seed = 0,
246 std::uint32_t
const& subsequence = 0,
249 return {seed, subsequence,
offset};
258 std::uint32_t
const& seed = 0,
259 std::uint32_t
const& subsequence = 0,
262 return {seed, subsequence,
offset};
271 std::uint32_t
const& seed = 0,
272 std::uint32_t
const& subsequence = 0,
275 return {seed, subsequence,
offset};
The standard library mersenne twister implementation.
The standard library rand device implementation.
"Tiny" state mersenne twister implementation
The standard library mersenne twister random number generator.
std::mt19937::result_type result_type
MersenneTwister()=default
ALPAKA_FN_HOST MersenneTwister(std::uint32_t const &seed, std::uint32_t const &subsequence=0, std::uint32_t const &offset=0)
static constexpr ALPAKA_FN_HOST auto max() -> result_type
ALPAKA_FN_HOST auto operator()() -> result_type
static constexpr ALPAKA_FN_HOST auto min() -> result_type
The standard library's random device based on the local entropy pool.
std::random_device::result_type result_type
ALPAKA_FN_HOST auto operator()() -> result_type
static constexpr ALPAKA_FN_HOST auto max() -> result_type
ALPAKA_FN_HOST RandomDevice(std::uint32_t const &, std::uint32_t const &=0, std::uint32_t const &=0)
static constexpr ALPAKA_FN_HOST auto min() -> result_type
"Tiny" state mersenne twister implementation
static constexpr ALPAKA_FN_HOST auto min() -> result_type
static constexpr ALPAKA_FN_HOST auto max() -> result_type
TinyMTengine::result_type result_type
ALPAKA_FN_HOST auto operator()() -> result_type
TinyMersenneTwister()=default
ALPAKA_FN_HOST TinyMersenneTwister(std::uint32_t const &seed, std::uint32_t const &subsequence=0, std::uint32_t const &offset=0)
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto max(T const &max_ctx, Tx const &x, Ty const &y)
Returns the larger of two arguments. NaNs are treated as missing data (between a NaN and a numeric va...
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto min(T const &min_ctx, Tx const &x, Ty const &y)
Returns the smaller of two arguments. NaNs are treated as missing data (between a NaN and a numeric v...
Tag used in class inheritance hierarchies that describes that a specific interface (TInterface) is im...
The CPU random number normal distribution.
ALPAKA_FN_HOST auto operator()(TEngine &engine) -> T
static ALPAKA_FN_HOST auto createNormalReal(RandStdLib const &) -> cpu::NormalReal< T >
The random number float normal distribution get trait.
Implementation of std::UniformRandomBitGenerator for TinyMT32.
std::uint32_t result_type
static constexpr auto max() -> result_type
static constexpr auto min() -> result_type
static ALPAKA_FN_HOST auto createDefault(MersenneTwister const &, std::uint32_t const &seed=0, std::uint32_t const &subsequence=0, std::uint32_t const &offset=0) -> cpu::MersenneTwister
static ALPAKA_FN_HOST auto createDefault(RandomDevice const &, std::uint32_t const &seed=0, std::uint32_t const &subsequence=0, std::uint32_t const &offset=0) -> cpu::RandomDevice
static ALPAKA_FN_HOST auto createDefault(TinyMersenneTwister const &, std::uint32_t const &seed=0, std::uint32_t const &subsequence=0, std::uint32_t const &offset=0) -> cpu::TinyMersenneTwister
The random number default generator engine get trait.