alpaka
Abstraction Library for Parallel Kernel Acceleration
|
#include <PhiloxStateless.hpp>
Public Types | |
using | Constants = PhiloxConstants< TParams > |
using | Counter = alpaka::Vec< alpaka::DimInt< TParams::counterSize >, std::uint32_t > |
using | Key = alpaka::Vec< alpaka::DimInt< TParams::counterSize/2 >, std::uint32_t > |
Static Public Member Functions | |
static ALPAKA_FN_HOST_ACC auto | generate (Counter const &counter, Key const &key) -> Counter |
Static Public Member Functions inherited from alpaka::rand::engine::PhiloxConstants< TParams > | |
static constexpr std::uint32_t | MULTIPLITER_4x32_0 () |
First Philox S-box multiplier. More... | |
static constexpr std::uint32_t | MULTIPLITER_4x32_1 () |
Second Philox S-box multiplier. More... | |
static constexpr std::uint32_t | WEYL_32_0 () |
1st Weyl sequence parameter, 32 bits More... | |
static constexpr std::uint32_t | WEYL_32_1 () |
2nd Weyl sequence parameter, 32 bits More... | |
static constexpr std::uint64_t | WEYL_64_0 () |
First Weyl sequence parameter: the golden ratio. More... | |
static constexpr std::uint64_t | WEYL_64_1 () |
Second Weyl sequence parameter: . More... | |
Static Protected Member Functions | |
static ALPAKA_FN_HOST_ACC auto | bumpKey (Key const &key) |
static ALPAKA_FN_HOST_ACC auto | nRounds (Counter const &counter_in, Key const &key_in) -> Counter |
static ALPAKA_FN_HOST_ACC auto | singleRound (Counter const &counter, Key const &key) |
Class basic Philox family counter-based PRNG
Checks the validity of passed-in parameters and calls the backend methods to perform N rounds of the Philox shuffle.
TParams | Philox algorithm parameters |
Definition at line 38 of file PhiloxStateless.hpp.
using alpaka::rand::engine::PhiloxStateless< TParams >::Constants = PhiloxConstants<TParams> |
Definition at line 65 of file PhiloxStateless.hpp.
using alpaka::rand::engine::PhiloxStateless< TParams >::Counter = alpaka::Vec<alpaka::DimInt<TParams::counterSize>, std::uint32_t> |
Definition at line 63 of file PhiloxStateless.hpp.
using alpaka::rand::engine::PhiloxStateless< TParams >::Key = alpaka::Vec<alpaka::DimInt<TParams::counterSize / 2>, std::uint32_t> |
Definition at line 64 of file PhiloxStateless.hpp.
|
inlinestaticprotected |
Bump the key by the Weyl sequence step parameter
key | the key to be bumped |
Definition at line 87 of file PhiloxStateless.hpp.
|
inlinestatic |
Generates a random number (TCounterSize
x32-bit)
counter | initial state of the counter |
key | initial state of the key |
Definition at line 120 of file PhiloxStateless.hpp.
|
inlinestaticprotected |
Performs N rounds of the Philox shuffle
counter_in | initial state of the counter |
key_in | initial state of the key |
Definition at line 98 of file PhiloxStateless.hpp.
|
inlinestaticprotected |
Single round of the Philox shuffle
counter | state of the counter |
key | value of the key |
Definition at line 74 of file PhiloxStateless.hpp.