53 #ifndef ROCRAND_THREEFRY2X64_20_H_ 
   54 #define ROCRAND_THREEFRY2X64_20_H_ 
   56 #include "rocrand/rocrand_threefry2_impl.h" 
   58 #include <hip/hip_runtime.h> 
   60 namespace rocrand_device
 
   63 class threefry2x64_20_engine : 
public threefry_engine2_base<ulonglong2, unsigned long long, 20>
 
   66     ROCRAND_DEPRECATED(
"Alias \"threefry2x64_20_state\" is deprecated. Use \"state_type\" instead.")
 
   67     typedef threefry_engine2_base<ulonglong2, 
unsigned long long, 20>::threefry_state_2
 
   68         threefry2x64_20_state;
 
   75     __forceinline__ __device__ __host__ threefry2x64_20_engine(const 
unsigned long long seed = 0,
 
   76                                                                const 
unsigned long long subsequence
 
   78                                                                const 
unsigned long long offset = 0)
 
   80         this->seed(seed, subsequence, offset);
 
   88     __forceinline__ __device__ __host__ 
void seed(
const unsigned long long seed        = 0,
 
   89                                                   const unsigned long long subsequence = 0,
 
   90                                                   const unsigned long long offset      = 0)
 
   92         m_state.counter  = {0ULL, 0ULL};
 
   93         m_state.key      = {seed, seed >> 32};
 
   94         m_state.result   = {0ULL, 0ULL};
 
   97         this->discard_subsequence_impl(subsequence);
 
   98         this->discard(offset);
 
   99         m_state.result = this->threefry_rounds(m_state.counter, m_state.key);
 
  106 typedef rocrand_device::threefry2x64_20_engine rocrand_state_threefry2x64_20;
 
  119 __forceinline__ __device__ __host__
 
  121                   const unsigned long long       subsequence,
 
  122                   const unsigned long long       offset,
 
  123                   rocrand_state_threefry2x64_20* state)
 
  125     *state = rocrand_state_threefry2x64_20(seed, subsequence, offset);
 
  142 __forceinline__ __device__ __host__
 
  143 unsigned long long rocrand(rocrand_state_threefry2x64_20* state)
 
  145     return state->next();
 
  160 __forceinline__ __device__ __host__
 
  161 ulonglong2 rocrand2(rocrand_state_threefry2x64_20* state)
 
  163     return state->next2();
 
__forceinline__ __device__ __host__ void rocrand_init(const uint4 seed, const unsigned int subsequence, rocrand_state_lfsr113 *state)
Initializes LFSR113 state.
Definition: rocrand_lfsr113.h:239
 
__forceinline__ __device__ __host__ unsigned int rocrand(rocrand_state_lfsr113 *state)
Returns uniformly distributed random unsigned int value from [0; 2^32 - 1] range.
Definition: rocrand_lfsr113.h:277