<tt>xoshiro
Loading...
Searching...
No Matches
xso::star_star< S, R, T, w >

The star_star scrambler is passed a state array an returns T * rotl(S * state[w], R) where: More...

#include <xoshiro.h>

Detailed Description

template<auto S, auto R, auto T, std::size_t w = 0>
struct xso::star_star< S, R, T, w >

The star_star scrambler is passed a state array an returns T * rotl(S * state[w], R) where:

Template Parameters
Sis a constant multiplier that should be odd.
Ris a rotation amount.
Tis a constant multiplier applied after the rotation.
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.