thrust
Classes | Functions
Random Number Engine Adaptor Class Templates

Classes

class  thrust::random::discard_block_engine< Engine, p, r >
 A discard_block_engine adapts an existing base random number engine and produces random values by discarding some of the values returned by its base engine. Each cycle of the compound engine begins by returning r values successively produced by the base engine and ends by discarding p-r such values. The engine's state is the state of its base engine followed by the number of calls to operator() that have occurred since the beginning of the current cycle. More...
 
class  thrust::random::xor_combine_engine< Engine1, s1, Engine2, s2 >
 An xor_combine_engine adapts two existing base random number engines and produces random values by combining the values produced by each. More...
 

Functions

template<typename Engine , size_t p, size_t r>
__host__ __device__ bool thrust::random::operator== (const discard_block_engine< Engine, p, r > &lhs, const discard_block_engine< Engine, p, r > &rhs)
 
template<typename Engine , size_t p, size_t r>
__host__ __device__ bool thrust::random::operator!= (const discard_block_engine< Engine, p, r > &lhs, const discard_block_engine< Engine, p, r > &rhs)
 
template<typename Engine , size_t p, size_t r, typename CharT , typename Traits >
std::basic_ostream< CharT,
Traits > & 
thrust::random::operator<< (std::basic_ostream< CharT, Traits > &os, const discard_block_engine< Engine, p, r > &e)
 
template<typename Engine , size_t p, size_t r, typename CharT , typename Traits >
std::basic_istream< CharT,
Traits > & 
thrust::random::operator>> (std::basic_istream< CharT, Traits > &is, discard_block_engine< Engine, p, r > &e)
 
template<typename Engine1_ , size_t s1_, typename Engine2_ , size_t s2_>
__host__ __device__ bool thrust::random::operator== (const xor_combine_engine< Engine1_, s1_, Engine2_, s2_ > &lhs, const xor_combine_engine< Engine1_, s1_, Engine2_, s2_ > &rhs)
 
template<typename Engine1_ , size_t s1_, typename Engine2_ , size_t s2_>
__host__ __device__ bool thrust::random::operator!= (const xor_combine_engine< Engine1_, s1_, Engine2_, s2_ > &lhs, const xor_combine_engine< Engine1_, s1_, Engine2_, s2_ > &rhs)
 
template<typename Engine1_ , size_t s1_, typename Engine2_ , size_t s2_, typename CharT , typename Traits >
std::basic_ostream< CharT,
Traits > & 
thrust::random::operator<< (std::basic_ostream< CharT, Traits > &os, const xor_combine_engine< Engine1_, s1_, Engine2_, s2_ > &e)
 
template<typename Engine1_ , size_t s1_, typename Engine2_ , size_t s2_, typename CharT , typename Traits >
std::basic_istream< CharT,
Traits > & 
thrust::random::operator>> (std::basic_istream< CharT, Traits > &is, xor_combine_engine< Engine1_, s1_, Engine2_, s2_ > &e)
 

Detailed Description

Function Documentation

template<typename Engine , size_t p, size_t r>
__host__ __device__ bool thrust::random::operator!= ( const discard_block_engine< Engine, p, r > &  lhs,
const discard_block_engine< Engine, p, r > &  rhs 
)

This function checks two discard_block_engines for inequality.

Parameters
lhsThe first discard_block_engine to test.
rhsThe second discard_block_engine to test.
Returns
true if lhs is not equal to rhs; false, otherwise.
template<typename Engine1_ , size_t s1_, typename Engine2_ , size_t s2_>
__host__ __device__ bool thrust::random::operator!= ( const xor_combine_engine< Engine1_, s1_, Engine2_, s2_ > &  lhs,
const xor_combine_engine< Engine1_, s1_, Engine2_, s2_ > &  rhs 
)

This function checks two xor_combine_engines for inequality.

Parameters
lhsThe first xor_combine_engine to test.
rhsThe second xor_combine_engine to test.
Returns
true if lhs is not equal to rhs; false, otherwise.
template<typename Engine , size_t p, size_t r, typename CharT , typename Traits >
std::basic_ostream<CharT,Traits>& thrust::random::operator<< ( std::basic_ostream< CharT, Traits > &  os,
const discard_block_engine< Engine, p, r > &  e 
)

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

Parameters
osThe basic_ostream to stream out to.
eThe discard_block_engine to stream out.
Returns
os
template<typename Engine1_ , size_t s1_, typename Engine2_ , size_t s2_, typename CharT , typename Traits >
std::basic_ostream<CharT,Traits>& thrust::random::operator<< ( std::basic_ostream< CharT, Traits > &  os,
const xor_combine_engine< Engine1_, s1_, Engine2_, s2_ > &  e 
)

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

Parameters
osThe basic_ostream to stream out to.
eThe xor_combine_engine to stream out.
Returns
os
template<typename Engine , size_t p, size_t r>
__host__ __device__ bool thrust::random::operator== ( const discard_block_engine< Engine, p, r > &  lhs,
const discard_block_engine< Engine, p, r > &  rhs 
)

This function checks two discard_block_engines for equality.

Parameters
lhsThe first discard_block_engine to test.
rhsThe second discard_block_engine to test.
Returns
true if lhs is equal to rhs; false, otherwise.
template<typename Engine1_ , size_t s1_, typename Engine2_ , size_t s2_>
__host__ __device__ bool thrust::random::operator== ( const xor_combine_engine< Engine1_, s1_, Engine2_, s2_ > &  lhs,
const xor_combine_engine< Engine1_, s1_, Engine2_, s2_ > &  rhs 
)

This function checks two xor_combine_engines for equality.

Parameters
lhsThe first xor_combine_engine to test.
rhsThe second xor_combine_engine to test.
Returns
true if lhs is equal to rhs; false, otherwise.
template<typename Engine , size_t p, size_t r, typename CharT , typename Traits >
std::basic_istream<CharT,Traits>& thrust::random::operator>> ( std::basic_istream< CharT, Traits > &  is,
discard_block_engine< Engine, p, r > &  e 
)

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

Parameters
isThe basic_istream to stream from.
eThe discard_block_engine to stream in.
Returns
is
template<typename Engine1_ , size_t s1_, typename Engine2_ , size_t s2_, typename CharT , typename Traits >
std::basic_istream<CharT,Traits>& thrust::random::operator>> ( std::basic_istream< CharT, Traits > &  is,
xor_combine_engine< Engine1_, s1_, Engine2_, s2_ > &  e 
)

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

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