alpaka
Abstraction Library for Parallel Kernel Acceleration
|
#include <PhiloxBaseCommon.hpp>
Public Types | |
using | Counter = typename PhiloxStateless< TParams >::Counter |
using | Key = typename PhiloxStateless< TParams >::Key |
template<typename TDistributionResultScalar > | |
using | ResultContainer = typename alpaka::Vec< alpaka::DimInt< TParams::counterSize >, TDistributionResultScalar > |
Distribution container type. More... | |
Public Types inherited from alpaka::rand::engine::PhiloxStateless< TParams > | |
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 > |
Protected Member Functions | |
ALPAKA_FN_HOST_ACC void | advanceCounter (Counter &counter) |
ALPAKA_FN_HOST_ACC void | skip4 (uint64_t offset) |
ALPAKA_FN_HOST_ACC void | skipSubsequence (uint64_t subsequence) |
Additional Inherited Members | |
Static Public Member Functions inherited from alpaka::rand::engine::PhiloxStateless< TParams > | |
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 inherited from alpaka::rand::engine::PhiloxStateless< TParams > | |
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) |
Common class for Philox family engines
Relies on PhiloxStateless
to provide the PRNG and adds state to handling the counting.
TParams | Philox algorithm parameters |
TImpl | engine type implementation (CRTP) |
static const data members are transformed into functions, because GCC assumes types with static data members to be not mappable and makes not exception for constexpr ones. This is a valid interpretation of the OpenMP <= 4.5 standard. In OpenMP >= 5.0 types with any kind of static data member are mappable.
Definition at line 27 of file PhiloxBaseCommon.hpp.
using alpaka::rand::engine::PhiloxBaseCommon< TParams, TImpl >::Counter = typename PhiloxStateless<TParams>::Counter |
Definition at line 30 of file PhiloxBaseCommon.hpp.
using alpaka::rand::engine::PhiloxBaseCommon< TParams, TImpl >::Key = typename PhiloxStateless<TParams>::Key |
Definition at line 31 of file PhiloxBaseCommon.hpp.
using alpaka::rand::engine::PhiloxBaseCommon< TParams, TImpl >::ResultContainer = typename alpaka::Vec<alpaka::DimInt<TParams::counterSize>, TDistributionResultScalar> |
Distribution container type.
Definition at line 35 of file PhiloxBaseCommon.hpp.
|
inlineprotected |
Advance the counter to the next state
Increments the passed-in counter by one with a 128-bit carry.
counter | reference to the counter which is to be advanced |
Definition at line 44 of file PhiloxBaseCommon.hpp.
|
inlineprotected |
Advance the internal state counter by offset N-vectors (N = counter size)
Advances the internal value of this->state.counter
offset | number of N-vectors to skip |
Definition at line 68 of file PhiloxBaseCommon.hpp.
|
inlineprotected |
Advance the counter by the length of subsequence
Advances the internal value of this->state.counter
subsequence | number of subsequences to skip |
Definition at line 84 of file PhiloxBaseCommon.hpp.