|
OpenQMC API
|
#include "arch.h"#include "gpu.h"#include "permute.h"#include "reverse.h"#include "rotate.h"#include <cassert>#include <cstdint>
Go to the source code of this file.
Functions | |
| std::uint16_t | oqmc::sobolReversedIndex (std::uint16_t index, int dimension) |
| Compute sobol sequence value at an index with reversed bits. | |
| constexpr std::uint32_t | oqmc::scrambleAndReverse (std::uint32_t value, std::uint32_t seed) |
| Permute an input integer and reverse the bits. | |
| template<int Depth> | |
| void | oqmc::shuffledScrambledSobol (std::uint32_t index, std::uint32_t seed, std::uint32_t sample[Depth]) |
| Compute a randomised sobol sequence value. | |
An efficient implementation of Owen scrambled sobol sequences. This can be used to construct higher level sampler types. The method uses Brent Burley's hash based 'Practical Hash-based Owen Scrambling' construction with added optimisations.
|
inline |
Given a 16 bit index, where the order of bits in the index have been reversed, compute a sobol sequence value to 16 bits of precision for a given dimension. Dimensions must be within the range [0, 4).
| [in] | index | Bit reversed index of element. |
| [in] | dimension | Dimension of sobol sequence. |

|
constexpr |
Given an input integer value, perform a Laine and Karras style permutation and reverse the resulting bits. The permutation can be randomised with a given seed value. This will be equivalent to an Owen scramble when the input bits of the integer are already reversed.
| [in] | value | Input integer value. |
| [in] | seed | Seed to change the permutation. |

|
inline |
Given an index and a seed, compute an Owen scrambled sobol sequence value. The index will be shuffled in a manner that is progressive friendly. The value can be multi-dimensional. For a given sequence, the seed value must be constant. An index greater than 2^16 will repeat values.
| Depth | Dimensional space of output, up to 4 dimensions. |
| [in] | index | Input index of sequence value. |
| [in] | seed | Seed to randomise the sequence. |
| [out] | sample | Randomised sequence value. |
