OpenQMC API
Loading...
Searching...
No Matches
oqmc::bntables Namespace Reference

Namespaces

namespace  lattice
 
namespace  pmj
 
namespace  sobol
 

Classes

struct  TableReturnValue
 Return type for table value. More...
 

Functions

template<int XBits, int YBits, int ZBits>
constexpr TableReturnValue tableValue (std::uint16_t pixel, std::uint16_t shift, const std::uint32_t keyTable[], const std::uint32_t rankTable[])
 Lookup value pair from table.
 

Variables

constexpr auto xBits = 8
 256 pixels in x.
 
constexpr auto yBits = 8
 256 pixels in y.
 
constexpr auto size = 1 << (xBits + yBits)
 2^16 table size.
 

Function Documentation

◆ tableValue()

template<int XBits, int YBits, int ZBits>
constexpr TableReturnValue oqmc::bntables::tableValue ( std::uint16_t  pixel,
std::uint16_t  shift,
const std::uint32_t  keyTable[],
const std::uint32_t  rankTable[] 
)
constexpr

Given an encoded pixel coordinate and an encoded pixel shift, decode the values and add the shift to the coordinate to compute an index. Using the index lookup a key and rank value pair from the input tables.

Template Parameters
XBitsPrecision along the X axis used for encoding.
YBitsPrecision along the Y axis used for encoding.
ZBitsPrecision along the Z axis used for encoding.
Parameters
[in]pixelEncoded pixel coordinate for lookup.
[in]shiftEncoded pixel shift for lookup.
[in]keyTableTable of key values.
[in]rankTableTable of rank values.
Returns
Key and rank pair from lookup.

Variable Documentation

◆ xBits

constexpr auto oqmc::bntables::xBits = 8
constexpr

◆ yBits

constexpr auto oqmc::bntables::yBits = 8
constexpr

◆ size

constexpr auto oqmc::bntables::size = 1 << (xBits + yBits)
constexpr