free.sprng {rsprng} | R Documentation |
free.sprng
frees the memory allocated to save the PRNG states by
SPRNG and calls RNGkind
to restore R's serial RNG.
free.sprng (kind.old = c("Marsaglia-Multicarry", "Kinderman-Ramage"))
kind.old |
a length 2 character vector, the old rng kinds
(possiblly returned by init.sprng ) |
SPRNG allocates some memory to save the state of the underlying RNG and the memory must be explicitly freed.
Return current PRNG state and NULL
if there were no active PRNG
stream.
Na (Michael) Li lina@u.washington.edu
SPRNG: Scalable Parallel Random Number Generator Library Web Page. http://sprng.cs.fsu.edu/
oldrng <- init.sprng (1, 0, seed = 231, kind = "PMLCG") runif (10) free.sprng (oldrng)