OpenQMC API
Loading...
Searching...
No Matches
state.h File Reference
#include "encode.h"
#include "gpu.h"
#include "pcg.h"
#include <cassert>
#include <cstdint>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  oqmc::State64Bit
 Generic sampler state type. More...
 

Functions

constexpr int oqmc::computeIndexKey (int index)
 Compute 16-bit key from index.
 
constexpr int oqmc::computeIndexId (int index)
 Compute new 16-bit index from index.
 

Detailed Description

Sampler state implementation.

Function Documentation

◆ computeIndexKey()

constexpr int oqmc::computeIndexKey ( int  index)
constexpr

Given a sample index, compute a key value based on the top 16-bits of the integer range. Use computeIndexId() to compute the corrosponding new index to pair with the key.

Parameters
[in]indexSample index.
Returns
16-bit Key value.
Here is the caller graph for this function:

◆ computeIndexId()

constexpr int oqmc::computeIndexId ( int  index)
constexpr

Given a sample index, compute a new index value based on the bottom 16-bits of the integer range. Use computeIndexKey() to compute the corrosponding key value to pair with the new index.

Parameters
[in]indexSample index.
Returns
New 16-bit index.
Here is the caller graph for this function: