vSMC
vSMC: Scalable Monte Carlo
|
Traits of XorshiftEngine. More...
#include <vsmc/rng/xorshift.hpp>
Static Public Attributes | |
static constexpr const std::size_t | max_loop_unroll = 4 |
Maximum number of states (e.g., 4 in Xorshift4x64) that an unrolled loop will be used. More... | |
Traits of XorshiftEngine.
Definition at line 87 of file xorshift.hpp.
|
static |
Maximum number of states (e.g., 4 in Xorshift4x64) that an unrolled loop will be used.
The original implementation of Marsaglia promote each value. That is, e.g., for a state of four integers x, y, z, w
, there is a step x = y; y = z; z = w
. This can be generalized to the situation of any abitrary number of integers. For the number of integers smaller than or equal to this value, the original implementation will be used, equivalent to
where n
is the number of the integers. The loop will be unrolled at compile time. Otherwise, no loop will be performed. Instead, a circular buffer is implemented through the use of modulo operation.
Definition at line 106 of file xorshift.hpp.