rocRAND
Classes | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
rocrand_device::threefry_engine4_base< state_value, value, Nrounds > Class Template Reference
Collaboration diagram for rocrand_device::threefry_engine4_base< state_value, value, Nrounds >:
Collaboration graph
[legend]

Classes

struct  threefry_state_4
 

Public Member Functions

FQUALIFIERS void discard (unsigned long long offset)
 Advances the internal state to skip offset numbers.
 
FQUALIFIERS void discard_subsequence (unsigned long long subsequence)
 Advances the internal state to skip subsequence subsequences, a subsequence consisting of 4 * (2 ^ b) random numbers, where b is the number of bits of the value type of the generator. More...
 
FQUALIFIERS value operator() ()
 
FQUALIFIERS value next ()
 
FQUALIFIERS state_value next4 ()
 

Protected Member Functions

FQUALIFIERS state_value threefry_rounds (state_value counter, state_value key)
 
FQUALIFIERS void discard_impl (unsigned long long offset)
 Advances the internal state to skip offset numbers. More...
 
FQUALIFIERS void discard_subsequence_impl (unsigned long long subsequence)
 Does not calculate new values (or update m_state.result).
 
FQUALIFIERS void discard_state (unsigned long long offset)
 Advances the internal state by offset times. More...
 
FQUALIFIERS state_value interleave (const state_value prev, const state_value next) const
 

Static Protected Member Functions

static FQUALIFIERS state_value bump_counter (state_value counter)
 

Protected Attributes

threefry_state_4 m_state
 

Member Function Documentation

◆ discard_impl()

template<typename state_value, typename value, unsigned int Nrounds>
FQUALIFIERS void rocrand_device::threefry_engine4_base< state_value, value, Nrounds >::discard_impl ( unsigned long long  offset)
inlineprotected

Advances the internal state to skip offset numbers.

Does not calculate new values (or update m_state.result).

◆ discard_state()

template<typename state_value, typename value, unsigned int Nrounds>
FQUALIFIERS void rocrand_device::threefry_engine4_base< state_value, value, Nrounds >::discard_state ( unsigned long long  offset)
inlineprotected

Advances the internal state by offset times.

Does not calculate new values (or update m_state.result).

◆ discard_subsequence()

template<typename state_value, typename value, unsigned int Nrounds>
FQUALIFIERS void rocrand_device::threefry_engine4_base< state_value, value, Nrounds >::discard_subsequence ( unsigned long long  subsequence)
inline

Advances the internal state to skip subsequence subsequences, a subsequence consisting of 4 * (2 ^ b) random numbers, where b is the number of bits of the value type of the generator.

In other words, this function is equivalent to calling discard 4 * (2 ^ b) times without using the return value, but is much faster.


The documentation for this class was generated from the following file: