Expand description
The PCG-RXS-M-XS generator, its O(log N) seek, and the Feistel
cycle walk: the bodies of pcg, pcg_stream, and cycle_walk,
which the native lowerings and the comprehension strategies call.
Structs§
- Cycle
Walk State - Pre-computed Feistel state for the
cycle_walknode. Built once at construction from(range, seed, stream)via the multi-source#[poly_const]setup; consumed read-only by every cycle and by thecompiled_u64override’s captured closure.
Constants§
- FEISTEL_
ROUNDS - Number of Feistel rounds. 6 rounds provides good diffusion.
- MULT
- The LCG multiplier of the 64-bit state.
Functions§
- build_
cycle_ walk_ state - Joint Feistel-state derivation. Single-call construction-time
invocation per node instance; the macro emits the call inside
the generated
CycleWalk::new(range, seed, stream). - cycle_
walk_ inner - Apply cycle-walking with the Feistel bijection.
- pcg_
output - Apply the RXS-M-XS output permutation to an LCG state.
- pcg_
seek - Seek to an arbitrary position in the PCG sequence in O(log N) time.