alpaka
Abstraction Library for Parallel Kernel Acceleration
|
#include <PhiloxVector.hpp>
Public Types | |
using | Base = PhiloxBaseCommon< TParams, PhiloxVector< TParams > > |
using | Counter = typename Base::Counter |
Counter type. More... | |
using | Key = typename Base::Key |
Key type. More... | |
template<typename TDistributionResultScalar > | |
using | ResultContainer = typename Base::template ResultContainer< TDistributionResultScalar > |
using | State = PhiloxStateVector< Counter, Key > |
State type. More... | |
Public Types inherited from alpaka::rand::engine::PhiloxBaseCommon< TParams, PhiloxVector< TParams > > | |
using | Counter = typename PhiloxStateless< TParams >::Counter |
using | Key = typename PhiloxStateless< TParams >::Key |
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 > |
Public Member Functions | |
ALPAKA_FN_HOST_ACC | PhiloxVector (uint64_t seed=0, uint64_t subsequence=0, uint64_t offset=0) |
ALPAKA_FN_HOST_ACC auto | operator() () |
Public Attributes | |
State | state |
Protected Member Functions | |
ALPAKA_FN_HOST_ACC auto | nextVector () |
ALPAKA_FN_HOST_ACC void | skip (uint64_t offset) |
Protected Member Functions inherited from alpaka::rand::engine::PhiloxBaseCommon< TParams, PhiloxVector< TParams > > | |
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) |
Philox engine generating a vector of numbers
This engine's operator() will return a vector of numbers corresponding to the full size of its counter. This is a convenience vs. memory size tradeoff since the user has to deal with the output array themselves, but the internal state comprises only of a single counter and a key.
TParams | Basic parameters for the Philox algorithm |
Definition at line 40 of file PhiloxVector.hpp.
using alpaka::rand::engine::PhiloxVector< TParams >::Base = PhiloxBaseCommon<TParams, PhiloxVector<TParams> > |
Definition at line 43 of file PhiloxVector.hpp.
using alpaka::rand::engine::PhiloxVector< TParams >::Counter = typename Base::Counter |
Counter type.
Definition at line 46 of file PhiloxVector.hpp.
using alpaka::rand::engine::PhiloxVector< TParams >::Key = typename Base::Key |
Key type.
Definition at line 48 of file PhiloxVector.hpp.
using alpaka::rand::engine::PhiloxVector< TParams >::ResultContainer = typename Base::template ResultContainer<TDistributionResultScalar> |
Definition at line 53 of file PhiloxVector.hpp.
using alpaka::rand::engine::PhiloxVector< TParams >::State = PhiloxStateVector<Counter, Key> |
State type.
Definition at line 50 of file PhiloxVector.hpp.
|
inline |
Construct a new Philox engine with vector output
seed | Set the Philox generator key |
subsequence | Select a subsequence of size 2^64 |
offset | Skip offset numbers form the start of the subsequence |
Definition at line 85 of file PhiloxVector.hpp.
|
inlineprotected |
Get the next array of random numbers and advance internal state
Definition at line 62 of file PhiloxVector.hpp.
|
inline |
Get the next vector of random numbers
Definition at line 97 of file PhiloxVector.hpp.
|
inlineprotected |
Skips the next offset vectors
Unlike its counterpart in PhiloxSingle, this function advances the state in multiples of the counter size thus skipping the entire array of numbers.
Definition at line 73 of file PhiloxVector.hpp.
State alpaka::rand::engine::PhiloxVector< TParams >::state |
Definition at line 55 of file PhiloxVector.hpp.