<tt>xoshiro
Loading...
Searching...
No Matches
xso::star< S, w >

The star scrambler is passed a state array and will return S * state[w] where: More...

#include <xoshiro.h>

Detailed Description

template<auto S, std::size_t w = 0>
struct xso::star< S, w >

The star scrambler is passed a state array and will return S * state[w] where:

Template Parameters
Sis a constant multiplier which should be odd to ensure good mixing of bits.
wis the index of the word in the state array to use.

For this scrambler, any choice of w will do as all the words are getting updated by the state advance algorithm. Typically, we use multipliers that are 2^s + 1 for some s as those are odd and compilers will optimize the multiplication to a shift and add.