![]() |
alpaka
Abstraction Library for Parallel Kernel Acceleration
|
Class basic Philox family counter-based PRNG. More...
#include <PhiloxStateless.hpp>
Public Types | |
| using | Counter = alpaka::Vec<std::uint32_t, T_Params::counterSize> |
| using | Key = alpaka::Vec<std::uint32_t, T_Params::counterSize / 2> |
Static Public Member Functions | |
| static constexpr auto | generate (Counter const &counter, Key const &key) -> Counter |
Generates a random number (TCounterSize x32-bit). | |
Static Protected Member Functions | |
| static constexpr auto | bumpKey (Key const &key) |
| Bump the key by the Weyl sequence step parameter. | |
| static constexpr auto | nRounds (Counter const &counter_in, Key const &key_in) -> Counter |
| Performs N rounds of the Philox shuffle. | |
| static constexpr auto | singleRound (Counter const &counter, Key const &key) |
| Single round of the Philox shuffle. | |
Static Private Member Functions | |
| static constexpr unsigned | numberWidth () |
| static constexpr unsigned | numRounds () |
| static constexpr unsigned | vectorSize () |
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.
| T_Params | Philox algorithm parameters |
Definition at line 38 of file PhiloxStateless.hpp.
| using alpaka::rand::engine::internal::PhiloxStateless< T_Params >::Counter = alpaka::Vec<std::uint32_t, T_Params::counterSize> |
Definition at line 63 of file PhiloxStateless.hpp.
| using alpaka::rand::engine::internal::PhiloxStateless< T_Params >::Key = alpaka::Vec<std::uint32_t, T_Params::counterSize / 2> |
Definition at line 64 of file PhiloxStateless.hpp.
|
inlinestaticconstexprprotected |
Bump the key by the Weyl sequence step parameter.
| key | the key to be bumped |
Definition at line 86 of file PhiloxStateless.hpp.
|
inlinestaticconstexpr |
Generates a random number (TCounterSize x32-bit).
| counter | initial state of the counter |
| key | initial state of the key |
Definition at line 121 of file PhiloxStateless.hpp.
|
inlinestaticconstexprprotected |
Performs N rounds of the Philox shuffle.
| counter_in | initial state of the counter |
| key_in | initial state of the key |
Definition at line 97 of file PhiloxStateless.hpp.
|
inlinestaticconstexprprivate |
Definition at line 50 of file PhiloxStateless.hpp.
|
inlinestaticconstexprprivate |
Definition at line 40 of file PhiloxStateless.hpp.
|
inlinestaticconstexprprotected |
Single round of the Philox shuffle.
| counter | state of the counter |
| key | value of the key |
Definition at line 73 of file PhiloxStateless.hpp.
|
inlinestaticconstexprprivate |
Definition at line 45 of file PhiloxStateless.hpp.