32 std::uint32_t
keyTable[bntables::size];
36 static constexpr std::size_t cacheSize =
sizeof(
CacheType);
37 static void initialiseCache(
void*
cache);
59inline void SobolBnImpl::initialiseCache(
void*
cache)
77inline SobolBnImpl::SobolBnImpl(
int x,
int y,
int frame,
int index,
79 : state(x, y, frame, index), cache(static_cast<const CacheType*>(cache))
84inline SobolBnImpl SobolBnImpl::newDomain(
int key)
const
86 return {state.newDomain(key), cache};
89inline SobolBnImpl SobolBnImpl::newDomainSplit(
int key,
int size,
92 return {state.newDomainSplit(key, size, index), cache};
95inline SobolBnImpl SobolBnImpl::newDomainDistrib(
int key,
int index)
const
97 return {state.newDomainDistrib(key, index), cache};
101void SobolBnImpl::drawSample(std::uint32_t sample[Size])
const
103 constexpr auto xBits = State64Bit::spatialEncodeBitSizeX;
104 constexpr auto yBits = State64Bit::spatialEncodeBitSizeY;
106 static_assert(
xBits == bntables::xBits,
107 "Pixel x encoding must match table.");
108 static_assert(
yBits == bntables::yBits,
109 "Pixel y encoding must match table.");
111 const auto table = bntables::tableValue<xBits, yBits, 0>(
112 state.pixelId, pcg::output(state.patternId), cache->keyTable,
115 shuffledScrambledSobol<Size>(state.sampleId ^ table.rank, table.key,
120void SobolBnImpl::drawRnd(std::uint32_t rnd[Size])
const
122 state.newDomain(state.pixelId).drawRnd<Size>(rnd);
#define OQMC_HOST_DEVICE
Definition gpu.h:13
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 keyTable[]
Optimised blue noise key table for pmj.
Definition bntables.h:93
constexpr std::uint32_t rankTable[]
Optimised blue noise rank table for pmj.
Definition bntables.h:98
constexpr std::uint32_t rankTable[]
Optimised blue noise rank table for sobol.
Definition bntables.h:125
constexpr std::uint32_t keyTable[]
Optimised blue noise key table for sobol.
Definition bntables.h:120
constexpr auto yBits
256 pixels in y.
Definition bntables.h:70
constexpr auto xBits
256 pixels in x.
Definition bntables.h:69