Computes the deterministic 7-integer L'Ecuyer-CMRG .Random.seed vector
for a given (seed, chunk_id, task_pos) tuple using base
parallel::nextRNGStream() (spacing chunks \(2^{127}\) draws apart) and
parallel::nextRNGSubStream() (spacing tasks within a chunk \(2^{76}\)
draws apart). Restores the caller's .Random.seed and RNGkind() on exit
so calling this function has zero global RNG side effects.
Examples
s1 <- slurmpilot_rng_stream(42L, chunk_id = 1L, task_pos = 1L)
s2 <- slurmpilot_rng_stream(42L, chunk_id = 2L, task_pos = 1L)
!identical(s1, s2)
#> [1] TRUE
