Hydra  4.0.1
A header-only templated C++ framework to perform data analysis on massively parallel platforms.
hydra::detail::quasi_random_base< DerivedT, LatticeT, SizeT > Class Template Reference

#include <QuasiRandomBase.h>

Inheritance diagram for hydra::detail::quasi_random_base< DerivedT, LatticeT, SizeT >:
Collaboration diagram for hydra::detail::quasi_random_base< DerivedT, LatticeT, SizeT >:

Public Types

typedef LatticeT::value_type result_type
 
typedef SizeT size_type
 

Public Member Functions

__hydra_host__ __hydra_device__ quasi_random_base ()
 
__hydra_host__ __hydra_device__ quasi_random_base (quasi_random_base< DerivedT, LatticeT, SizeT > const &other)
 
__hydra_host__ __hydra_device__ constexpr unsigned dimension () const
 Returns: The dimension of of the quasi-random domain. More...
 
__hydra_host__ __hydra_device__ void discard (uintmax_t z)
 Effects: Advances *this state as if z consecutive X::operator() invocations were executed. More...
 
template<typename ... T>
__hydra_host__ __hydra_device__ std::enable_if< sizeof...(T)==LatticeT::lattice_dimension, void >::type generate (hydra::tuple< T... > &data)
 Fills a range with quasi-random values. More...
 
__hydra_host__ __hydra_device__ result_type operator() ()
 Returns: Returns a successive element of an s-dimensional (s = X::dimension()) vector at each invocation. More...
 
__hydra_host__ __hydra_device__ quasi_random_base< DerivedT, LatticeT, SizeT > operator= (quasi_random_base< DerivedT, LatticeT, SizeT > const &other)
 

Protected Types

typedef result_typestate_iterator
 

Protected Member Functions

__hydra_host__ __hydra_device__ size_type curr_seq () const
 
__hydra_host__ __hydra_device__ void reset_seq (size_type seq)
 
__hydra_host__ __hydra_device__ state_iterator state_begin ()
 
__hydra_host__ __hydra_device__ state_iterator state_end ()
 

Protected Attributes

LatticeT lattice
 

Friends

__hydra_host__ __hydra_device__ friend bool operator!= (const quasi_random_base &lhs, const quasi_random_base &rhs)
 Returns true if the two generators will produce different sequences of outputs. More...
 
__hydra_host__ __hydra_device__ friend bool operator== (const quasi_random_base &x, const quasi_random_base &y)
 Returns true if the two generators will produce identical sequences of outputs. More...
 

Detailed Description

template<typename DerivedT, typename LatticeT, typename SizeT>
class hydra::detail::quasi_random_base< DerivedT, LatticeT, SizeT >

Member Typedef Documentation

◆ result_type

template<typename DerivedT, typename LatticeT, typename SizeT>
typedef LatticeT::value_type hydra::detail::quasi_random_base< DerivedT, LatticeT, SizeT >::result_type

◆ size_type

template<typename DerivedT, typename LatticeT, typename SizeT>
typedef SizeT hydra::detail::quasi_random_base< DerivedT, LatticeT, SizeT >::size_type

◆ state_iterator

template<typename DerivedT, typename LatticeT, typename SizeT>
typedef result_type* hydra::detail::quasi_random_base< DerivedT, LatticeT, SizeT >::state_iterator
protected

Constructor & Destructor Documentation

◆ quasi_random_base() [1/2]

template<typename DerivedT, typename LatticeT, typename SizeT>
__hydra_host__ __hydra_device__ hydra::detail::quasi_random_base< DerivedT, LatticeT, SizeT >::quasi_random_base ( )
inline

◆ quasi_random_base() [2/2]

template<typename DerivedT, typename LatticeT, typename SizeT>
__hydra_host__ __hydra_device__ hydra::detail::quasi_random_base< DerivedT, LatticeT, SizeT >::quasi_random_base ( quasi_random_base< DerivedT, LatticeT, SizeT > const &  other)
inline

Member Function Documentation

◆ curr_seq()

template<typename DerivedT, typename LatticeT, typename SizeT>
__hydra_host__ __hydra_device__ size_type hydra::detail::quasi_random_base< DerivedT, LatticeT, SizeT >::curr_seq ( ) const
inlineprotected

◆ dimension()

template<typename DerivedT, typename LatticeT, typename SizeT>
__hydra_host__ __hydra_device__ constexpr unsigned hydra::detail::quasi_random_base< DerivedT, LatticeT, SizeT >::dimension ( ) const
inline

Returns: The dimension of of the quasi-random domain.

◆ discard()

template<typename DerivedT, typename LatticeT, typename SizeT>
__hydra_host__ __hydra_device__ void hydra::detail::quasi_random_base< DerivedT, LatticeT, SizeT >::discard ( uintmax_t  z)
inline

Effects: Advances *this state as if z consecutive X::operator() invocations were executed.

Throws: range_error.

◆ generate()

template<typename DerivedT, typename LatticeT, typename SizeT>
template<typename ... T>
__hydra_host__ __hydra_device__ std::enable_if< sizeof...(T)==LatticeT::lattice_dimension, void>::type hydra::detail::quasi_random_base< DerivedT, LatticeT, SizeT >::generate ( hydra::tuple< T... > &  data)
inline

Fills a range with quasi-random values.

◆ operator()()

template<typename DerivedT, typename LatticeT, typename SizeT>
__hydra_host__ __hydra_device__ result_type hydra::detail::quasi_random_base< DerivedT, LatticeT, SizeT >::operator() ( void  )
inline

Returns: Returns a successive element of an s-dimensional (s = X::dimension()) vector at each invocation.

When all elements are exhausted, X::operator() begins anew with the starting element of a subsequent s-dimensional vector.

◆ operator=()

template<typename DerivedT, typename LatticeT, typename SizeT>
__hydra_host__ __hydra_device__ quasi_random_base<DerivedT,LatticeT, SizeT> hydra::detail::quasi_random_base< DerivedT, LatticeT, SizeT >::operator= ( quasi_random_base< DerivedT, LatticeT, SizeT > const &  other)
inline

◆ reset_seq()

template<typename DerivedT, typename LatticeT, typename SizeT>
__hydra_host__ __hydra_device__ void hydra::detail::quasi_random_base< DerivedT, LatticeT, SizeT >::reset_seq ( size_type  seq)
inlineprotected

◆ state_begin()

template<typename DerivedT, typename LatticeT, typename SizeT>
__hydra_host__ __hydra_device__ state_iterator hydra::detail::quasi_random_base< DerivedT, LatticeT, SizeT >::state_begin ( )
inlineprotected

◆ state_end()

template<typename DerivedT, typename LatticeT, typename SizeT>
__hydra_host__ __hydra_device__ state_iterator hydra::detail::quasi_random_base< DerivedT, LatticeT, SizeT >::state_end ( )
inlineprotected

Friends And Related Function Documentation

◆ operator!=

template<typename DerivedT, typename LatticeT, typename SizeT>
__hydra_host__ __hydra_device__ friend bool operator!= ( const quasi_random_base< DerivedT, LatticeT, SizeT > &  lhs,
const quasi_random_base< DerivedT, LatticeT, SizeT > &  rhs 
)
friend

Returns true if the two generators will produce different sequences of outputs.

◆ operator==

template<typename DerivedT, typename LatticeT, typename SizeT>
__hydra_host__ __hydra_device__ friend bool operator== ( const quasi_random_base< DerivedT, LatticeT, SizeT > &  x,
const quasi_random_base< DerivedT, LatticeT, SizeT > &  y 
)
friend

Returns true if the two generators will produce identical sequences of outputs.

Field Documentation

◆ lattice

template<typename DerivedT, typename LatticeT, typename SizeT>
LatticeT hydra::detail::quasi_random_base< DerivedT, LatticeT, SizeT >::lattice
protected

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