32 #ifndef MCKL_RANDOM_RNG_SET_HPP 33 #define MCKL_RANDOM_RNG_SET_HPP 40 #include <tbb/enumerable_thread_specific.h> 45 #ifndef MCKL_RNG_SET_TYPE 47 #define MCKL_RNG_SET_TYPE ::mckl::RNGSetTBB 49 #define MCKL_RNG_SET_TYPE ::mckl::RNGSetVector 57 template <
typename RNGType = RNG>
81 template <
typename RNGType = RNG>
94 if (n == rng_.size()) {
98 if (n < rng_.size()) {
104 for (std::size_t i = m; i != n; ++i) {
111 for (
auto &rng : rng_) {
126 template <
typename RNGType =
RNG,
127 typename Alloc = ::tbb::cache_aligned_allocator<RNGType>,
128 ::tbb::ets_key_usage_type ETSKeyType = ::tbb::ets_no_key>
151 ::tbb::enumerable_thread_specific<rng_type, Alloc, ETSKeyType> rng_;
157 template <
typename RNGType = RNG>
159 ::tbb::cache_aligned_allocator<RNGType>, ::tbb::ets_no_key>;
164 template <
typename RNGType = RNG>
166 ::tbb::cache_aligned_allocator<RNGType>, ::tbb::ets_key_per_instance>;
168 #endif // MCKL_HAS_TBB 172 template <typename RNGType = typename MCKL_RNG_SET_TYPE<>::rng_type>
173 using RNGSet = MCKL_RNG_SET_TYPE<RNGType>;
181 #endif // MCKL_RANDOM_RNG_SET_HPP
RNGSetTBBEnumerable(size_type=0)
rng_type & operator[](size_type)
std::vector< T, Alloc > Vector
std::vector with Allocator as the default allocator
#define MCKL_DEFINE_TYPE_DISPATCH_TRAIT(Outer, Inner, Default)
RNGSetVector(size_type N=0)
typename RNGSetTypeTrait< T >::type RNGSetType
Thread-local storage RNG set using tbb::enumerable_thread_specific.
typename Vector< rng_type >::size_type size_type
::mckl::ARS RNG
The default 32-bit RNG.
rng_type & operator[](size_type id)
void resize(std::size_t n)
RNGSetScalar(size_type=0)
RNG default seed generator.
rng_type & operator[](size_type)