32 #ifndef VSMC_RNG_RNG_SET_HPP 33 #define VSMC_RNG_RNG_SET_HPP 39 #include <tbb/combinable.h> 44 #ifndef VSMC_RNG_SET_TYPE 46 #define VSMC_RNG_SET_TYPE ::vsmc::RNGSetTBB<::vsmc::RNG> 48 #define VSMC_RNG_SET_TYPE ::vsmc::RNGSetVector<::vsmc::RNG> 57 template <
typename RNGType>
81 template <
typename RNGType>
105 for (std::size_t i = rng_.size(); i != n; ++i) {
113 for (
auto &rng : rng_)
128 template <
typename RNGType>
136 : size_(N), rng_([]() {
155 ::tbb::combinable<rng_type> rng_;
158 #endif // VSMC_HAS_TBB 168 #endif // VSMC_RNG_RNG_SET_HPP
#define VSMC_DEFINE_TYPE_DISPATCH_TRAIT(Outer, Inner, Default)
static SeedGenerator< ID, ResultType > & instance()
std::vector< T, AlignedAllocator< T >> AlignedVector
Vector type using AlignedAllocator.
typename RNGSetTypeTrait< T >::type RNGSetType
RNGSetVector(size_type N=0)
typename AlignedVector< rng_type >::size_type size_type
rng_type & operator[](size_type id)
#define VSMC_RNG_SET_TYPE
Default RNG set type.
rng_type & operator[](size_type)
rng_type & operator[](size_type)
Thread-local storage RNG set using tbb::combinable.
RNGSetScalar(size_type N=0)
void resize(std::size_t n)