32 #ifndef VSMC_RNG_RNG_SET_HPP 33 #define VSMC_RNG_RNG_SET_HPP 40 #include <tbb/combinable.h> 45 #ifndef VSMC_RNG_SET_TYPE 47 #define VSMC_RNG_SET_TYPE ::vsmc::RNGSetTBB 49 #define VSMC_RNG_SET_TYPE ::vsmc::RNGSetVector 58 template <
typename RNGType = RNG>
84 template <
typename RNGType = RNGMini>
120 template <
typename RNGType = RNG>
128 : size_(N), rng_([]() {
147 ::tbb::combinable<rng_type> rng_;
150 #endif // VSMC_HAS_TBB 154 template <
typename RNGType =
typename std::conditional<
157 using RNGSet = VSMC_RNG_SET_TYPE<RNGType>;
165 #endif // VSMC_RNG_RNG_SET_HPP
#define VSMC_DEFINE_TYPE_DISPATCH_TRAIT(Outer, Inner, Default)
std::vector< T, Alloc > Vector
std::vector with Allocator as default allocator
static SeedGenerator< ID, ResultType > & instance()
::vsmc::Philox2x32 RNGMini
The 32-bits RNG with smallest state.
typename RNGSetTypeTrait< T >::type RNGSetType
RNGSetVector(size_type N=0)
Counter based RNG engine.
rng_type & operator[](size_type id)
rng_type & operator[](size_type)
rng_type & operator[](size_type)
Thread-local storage RNG set using tbb::combinable.
typename Vector< rng_type >::size_type size_type
void resize(std::size_t n)
#define VSMC_DEFINE_NEW_DELETE(Class)
Define class member new and delete using AlignedMemory.