109template <
typename Impl>
113 static constexpr auto maxDrawValue = 4;
129 static constexpr std::size_t
cacheSize = Impl::cacheSize;
353 std::uint32_t
rnd[
Size])
const;
367template <
typename Impl>
370 Impl::initialiseCache(
cache);
373template <
typename Impl>
378template <
typename Impl>
386template <
typename Impl>
392template <
typename Impl>
399 return {impl.newDomainSplit(key, size, index)};
402template <
typename Impl>
408 return {impl.newDomainDistrib(key, index)};
411template <
typename Impl>
417 return {impl.newDomain(key).newDomain(index)};
420template <
typename Impl>
424 static_assert(
Size >= 0,
"Draw size greater or equal to zero.");
425 static_assert(
Size <= maxDrawValue,
"Draw size less or equal to max.");
430template <
typename Impl>
446template <
typename Impl>
459template <
typename Impl>
463 static_assert(
Size >= 0,
"Draw size greater or equal to zero.");
464 static_assert(
Size <= maxDrawValue,
"Draw size less or equal to max.");
469template <
typename Impl>
485template <
typename Impl>
#define OQMC_HOST_DEVICE
Definition gpu.h:13
SamplerInterface newDomainSplit(int key, int size, int index) const
Derive a split sampler object with a local and a global distribution.
Definition sampler.h:393
static constexpr std::size_t cacheSize
Required allocation size of the cache.
Definition sampler.h:129
static void initialiseCache(void *cache)
Initialise the cache allocation.
Definition sampler.h:368
SamplerInterface newDomain(int key) const
Derive a sampler object as a new domain.
Definition sampler.h:387
SamplerInterface newDomainDistrib(int key, int index) const
Derive a split sampler object with a local distribution.
Definition sampler.h:403
void drawRnd(std::uint32_t rnd[Size]) const
Draw integer pseudo random values from domain.
Definition sampler.h:461
void drawSample(std::uint32_t sample[Size]) const
Draw integer sample values from domain.
Definition sampler.h:422
SamplerInterface()=default
Construct an invalid sampler object.
SamplerInterface newDomainChain(int key, int index) const
Derive a split sampler object with a global distribution.
Definition sampler.h:412
Public sampler API.
Definition sampler.h:111
EncodeKey decodeBits16(std::uint16_t value)
Decode a value back into a key.
Definition encode.h:81
constexpr std::uint32_t uintToRange(std::uint32_t value, std::uint32_t range)
Compute an unsigned integer within 0-bounded half-open range.
Definition range.h:40
float uintToFloat(std::uint32_t value)
Convert an integer into a [0, 1) float.
Definition float.h:47