thrust
Classes | Functions
Random Number Engine Class Templates

Classes

class  thrust::random::linear_congruential_engine< UIntType, a, c, m >
 A linear_congruential_engine random number engine produces unsigned integer random numbers using a linear congruential random number generation algorithm. More...
 
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. More...
 
class  thrust::random::subtract_with_carry_engine< UIntType, w, s, r >
 A subtract_with_carry_engine random number engine produces unsigned integer random numbers using the subtract with carry algorithm of Marsaglia & Zaman. More...
 

Functions

template<typename UIntType_ , UIntType_ a_, UIntType_ c_, UIntType_ m_>
__host__ __device__ bool thrust::random::operator== (const linear_congruential_engine< UIntType_, a_, c_, m_ > &lhs, const linear_congruential_engine< UIntType_, a_, c_, m_ > &rhs)
 
template<typename UIntType_ , UIntType_ a_, UIntType_ c_, UIntType_ m_>
__host__ __device__ bool thrust::random::operator!= (const linear_congruential_engine< UIntType_, a_, c_, m_ > &lhs, const linear_congruential_engine< UIntType_, a_, c_, m_ > &rhs)
 
template<typename UIntType_ , UIntType_ a_, UIntType_ c_, UIntType_ m_, typename CharT , typename Traits >
std::basic_ostream< CharT,
Traits > & 
thrust::random::operator<< (std::basic_ostream< CharT, Traits > &os, const linear_congruential_engine< UIntType_, a_, c_, m_ > &e)
 
template<typename UIntType_ , UIntType_ a_, UIntType_ c_, UIntType_ m_, typename CharT , typename Traits >
std::basic_istream< CharT,
Traits > & 
thrust::random::operator>> (std::basic_istream< CharT, Traits > &is, linear_congruential_engine< UIntType_, a_, c_, m_ > &e)
 
template<typename UIntType_ , size_t w_, size_t k_, size_t q_, size_t s_>
__host__ __device__ bool thrust::random::operator== (const linear_feedback_shift_engine< UIntType_, w_, k_, q_, s_ > &lhs, const linear_feedback_shift_engine< UIntType_, w_, k_, q_, s_ > &rhs)
 
template<typename UIntType_ , size_t w_, size_t k_, size_t q_, size_t s_>
__host__ __device__ bool thrust::random::operator!= (const linear_feedback_shift_engine< UIntType_, w_, k_, q_, s_ > &lhs, const linear_feedback_shift_engine< UIntType_, w_, k_, q_, s_ > &rhs)
 
template<typename UIntType_ , size_t w_, size_t k_, size_t q_, size_t s_, typename CharT , typename Traits >
std::basic_ostream< CharT,
Traits > & 
thrust::random::operator<< (std::basic_ostream< CharT, Traits > &os, const linear_feedback_shift_engine< UIntType_, w_, k_, q_, s_ > &e)
 
template<typename UIntType_ , size_t w_, size_t k_, size_t q_, size_t s_, typename CharT , typename Traits >
std::basic_istream< CharT,
Traits > & 
thrust::random::operator>> (std::basic_istream< CharT, Traits > &is, linear_feedback_shift_engine< UIntType_, w_, k_, q_, s_ > &e)
 
template<typename UIntType_ , size_t w_, size_t s_, size_t r_>
__host__ __device__ bool thrust::random::operator== (const subtract_with_carry_engine< UIntType_, w_, s_, r_ > &lhs, const subtract_with_carry_engine< UIntType_, w_, s_, r_ > &rhs)
 
template<typename UIntType_ , size_t w_, size_t s_, size_t r_>
__host__ __device__ bool thrust::random::operator!= (const subtract_with_carry_engine< UIntType_, w_, s_, r_ > &lhs, const subtract_with_carry_engine< UIntType_, w_, s_, r_ > &rhs)
 
template<typename UIntType_ , size_t w_, size_t s_, size_t r_, typename CharT , typename Traits >
std::basic_ostream< CharT,
Traits > & 
thrust::random::operator<< (std::basic_ostream< CharT, Traits > &os, const subtract_with_carry_engine< UIntType_, w_, s_, r_ > &e)
 
template<typename UIntType_ , size_t w_, size_t s_, size_t r_, typename CharT , typename Traits >
std::basic_istream< CharT,
Traits > & 
thrust::random::operator>> (std::basic_istream< CharT, Traits > &is, subtract_with_carry_engine< UIntType_, w_, s_, r_ > &e)
 

Detailed Description

Function Documentation

template<typename UIntType_ , size_t w_, size_t s_, size_t r_>
__host__ __device__ bool thrust::random::operator!= ( const subtract_with_carry_engine< UIntType_, w_, s_, r_ > &  lhs,
const subtract_with_carry_engine< UIntType_, w_, s_, r_ > &  rhs 
)

This function checks two subtract_with_carry_engines for inequality.

Parameters
lhsThe first subtract_with_carry_engine to test.
rhsThe second subtract_with_carry_engine to test.
Returns
true if lhs is not equal to rhs; false, otherwise.
template<typename UIntType_ , size_t w_, size_t k_, size_t q_, size_t s_>
__host__ __device__ bool thrust::random::operator!= ( const linear_feedback_shift_engine< UIntType_, w_, k_, q_, s_ > &  lhs,
const linear_feedback_shift_engine< UIntType_, w_, k_, q_, s_ > &  rhs 
)

This function checks two linear_feedback_shift_engines for inequality.

Parameters
lhsThe first linear_feedback_shift_engine to test.
rhsThe second linear_feedback_shift_engine to test.
Returns
true if lhs is not equal to rhs; false, otherwise.
template<typename UIntType_ , UIntType_ a_, UIntType_ c_, UIntType_ m_>
__host__ __device__ bool thrust::random::operator!= ( const linear_congruential_engine< UIntType_, a_, c_, m_ > &  lhs,
const linear_congruential_engine< UIntType_, a_, c_, m_ > &  rhs 
)

This function checks two linear_congruential_engines for inequality.

Parameters
lhsThe first linear_congruential_engine to test.
rhsThe second linear_congruential_engine to test.
Returns
true if lhs is not equal to rhs; false, otherwise.
template<typename UIntType_ , size_t w_, size_t s_, size_t r_, typename CharT , typename Traits >
std::basic_ostream<CharT,Traits>& thrust::random::operator<< ( std::basic_ostream< CharT, Traits > &  os,
const subtract_with_carry_engine< UIntType_, w_, s_, r_ > &  e 
)

This function streams a subtract_with_carry_engine to a std::basic_ostream.

Parameters
osThe basic_ostream to stream out to.
eThe subtract_with_carry_engine to stream out.
Returns
os
template<typename UIntType_ , size_t w_, size_t k_, size_t q_, size_t s_, typename CharT , typename Traits >
std::basic_ostream<CharT,Traits>& thrust::random::operator<< ( std::basic_ostream< CharT, Traits > &  os,
const linear_feedback_shift_engine< UIntType_, w_, k_, q_, s_ > &  e 
)

This function streams a linear_feedback_shift_engine to a std::basic_ostream.

Parameters
osThe basic_ostream to stream out to.
eThe linear_feedback_shift_engine to stream out.
Returns
os
template<typename UIntType_ , UIntType_ a_, UIntType_ c_, UIntType_ m_, typename CharT , typename Traits >
std::basic_ostream<CharT,Traits>& thrust::random::operator<< ( std::basic_ostream< CharT, Traits > &  os,
const linear_congruential_engine< UIntType_, a_, c_, m_ > &  e 
)

This function streams a linear_congruential_engine to a std::basic_ostream.

Parameters
osThe basic_ostream to stream out to.
eThe linear_congruential_engine to stream out.
Returns
os
template<typename UIntType_ , size_t w_, size_t s_, size_t r_>
__host__ __device__ bool thrust::random::operator== ( const subtract_with_carry_engine< UIntType_, w_, s_, r_ > &  lhs,
const subtract_with_carry_engine< UIntType_, w_, s_, r_ > &  rhs 
)

This function checks two subtract_with_carry_engines for equality.

Parameters
lhsThe first subtract_with_carry_engine to test.
rhsThe second subtract_with_carry_engine to test.
Returns
true if lhs is equal to rhs; false, otherwise.
template<typename UIntType_ , size_t w_, size_t k_, size_t q_, size_t s_>
__host__ __device__ bool thrust::random::operator== ( const linear_feedback_shift_engine< UIntType_, w_, k_, q_, s_ > &  lhs,
const linear_feedback_shift_engine< UIntType_, w_, k_, q_, s_ > &  rhs 
)

This function checks two linear_feedback_shift_engines for equality.

Parameters
lhsThe first linear_feedback_shift_engine to test.
rhsThe second linear_feedback_shift_engine to test.
Returns
true if lhs is equal to rhs; false, otherwise.
template<typename UIntType_ , UIntType_ a_, UIntType_ c_, UIntType_ m_>
__host__ __device__ bool thrust::random::operator== ( const linear_congruential_engine< UIntType_, a_, c_, m_ > &  lhs,
const linear_congruential_engine< UIntType_, a_, c_, m_ > &  rhs 
)

This function checks two linear_congruential_engines for equality.

Parameters
lhsThe first linear_congruential_engine to test.
rhsThe second linear_congruential_engine to test.
Returns
true if lhs is equal to rhs; false, otherwise.
template<typename UIntType_ , size_t w_, size_t s_, size_t r_, typename CharT , typename Traits >
std::basic_istream<CharT,Traits>& thrust::random::operator>> ( std::basic_istream< CharT, Traits > &  is,
subtract_with_carry_engine< UIntType_, w_, s_, r_ > &  e 
)

This function streams a subtract_with_carry_engine in from a std::basic_istream.

Parameters
isThe basic_istream to stream from.
eThe subtract_with_carry_engine to stream in.
Returns
is
template<typename UIntType_ , size_t w_, size_t k_, size_t q_, size_t s_, typename CharT , typename Traits >
std::basic_istream<CharT,Traits>& thrust::random::operator>> ( std::basic_istream< CharT, Traits > &  is,
linear_feedback_shift_engine< UIntType_, w_, k_, q_, s_ > &  e 
)

This function streams a linear_feedback_shift_engine in from a std::basic_istream.

Parameters
isThe basic_istream to stream from.
eThe linear_feedback_shift_engine to stream in.
Returns
is
template<typename UIntType_ , UIntType_ a_, UIntType_ c_, UIntType_ m_, typename CharT , typename Traits >
std::basic_istream<CharT,Traits>& thrust::random::operator>> ( std::basic_istream< CharT, Traits > &  is,
linear_congruential_engine< UIntType_, a_, c_, m_ > &  e 
)

This function streams a linear_congruential_engine in from a std::basic_istream.

Parameters
isThe basic_istream to stream from.
eThe linear_congruential_engine to stream in.
Returns
is