|
Celeritas 0.7.0-dev.228+develop.9905a715
|
Implements the RANLUX++ random number generator engine with modifications. More...
#include <RanluxppRngEngine.hh>
Public Types | |
| using | result_type = std::uint32_t |
| Public types. | |
| using | Initializer_t = RanluxppInitializer |
| using | ParamsRef = NativeCRef< RanluxppRngParamsData > |
| using | StateRef = NativeRef< RanluxppRngStateData > |
Public Member Functions | |
| CELER_FUNCTION | RanluxppRngEngine (ParamsRef const ¶ms, StateRef const &state, TrackSlotId tid) |
| Instantiate with optional default seed. | |
| CELER_FUNCTION RanluxppRngEngine & | operator= (Initializer_t const &init) |
| Initialize state for the given seed and subsequence. | |
| CELER_FUNCTION result_type | operator() () |
| Return the next random bits, generating a new block if necessary. | |
| CELER_FUNCTION void | discard (RanluxppUInt count) |
Skip n random numbers without generating them. | |
Static Public Member Functions | |
| static CELER_CONSTEXPR_FUNCTION result_type | min () |
| Lowest value potentially generated. | |
| static CELER_CONSTEXPR_FUNCTION result_type | max () |
| Highest value potentially generated. | |
Implements the RANLUX++ random number generator engine with modifications.
This implementation of RANLUX++ (sibidanov-revisionsubtractwithborrow-2017) is based directly on the implementation of hahnfeld-ranlux-2021. The RANLUX++ algorithm is an optimization of the RANLUX generator (james-ranluxfortran-1994), based on work by Luscher's modification (luscher-portablehighquality-1994) of Marsaglia and Zaman's RCARRY (james-reviewpseudorandom-1990). As discussed in the RANLUX theory paper, the algorithm is essentially a linear congruential generator (LCG) with a huge state.
The underlying RCARRY algorithm used an array of 24 24-bit integer words, which with today's large integer sizes can be written as 9 64-bit integers. A given state is used to extract 12 samples, and the lower 32 bits of each is used as entropy.