thrust
Public Types | Public Member Functions | Static Public Attributes | List of all members
thrust::random::linear_feedback_shift_engine< UIntType, w, k, q, s > Class Template Reference

A linear_feedback_shift_engine random number engine produces unsigned integer random values using a linear feedback shift random number generation algorithm. More...

#include <thrust/random/linear_feedback_shift_engine.h>

Public Types

typedef UIntType result_type
 The type of the unsigned integer produced by this linear_feedback_shift_engine.
 

Public Member Functions

__host__ __device__ linear_feedback_shift_engine (result_type value=default_seed)
 
__host__ __device__ void seed (result_type value=default_seed)
 
__host__ __device__ result_type operator() (void)
 
__host__ __device__ void discard (unsigned long long z)
 

Static Public Attributes

static const size_t word_size = w
 
static const size_t exponent1 = k
 
static const size_t exponent2 = q
 
static const size_t step_size = s
 
static const result_type min = 0
 
static const result_type max = wordmask
 
static const result_type default_seed = 341u
 

Detailed Description

template<typename UIntType, size_t w, size_t k, size_t q, size_t s>
class thrust::random::linear_feedback_shift_engine< UIntType, w, k, q, s >

A linear_feedback_shift_engine random number engine produces unsigned integer random values using a linear feedback shift random number generation algorithm.

Template Parameters
UIntTypeThe type of unsigned integer to produce.
wThe word size of the produced values (w <= sizeof(UIntType)).
kThe k parameter of Tausworthe's 1965 algorithm.
qThe q exponent of Tausworthe's 1965 algorithm.
sThe step size of Tausworthe's 1965 algorithm.
Note
linear_feedback_shift_engine is based on the Boost Template Library's linear_feedback_shift.

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