gset.seed: Set the seed values, and number of states for the GPU.

Description Usage Arguments Author(s)

View source: R/00general.R


This function enables the user to set a seed value for reproducible random number generation. It also allows the user to set the number of states to tune the efficiency of random number generator for the GPU.


gset.seed(seed=unclass(Sys.time()), total_states=as.integer(32*14*16), silent=TRUE)



Must be a positive integer.


Random numbers are generated from separate streams in parallel with each stream having a current state. This variable must be a positive integer. It is recommended that the integer be a multiple of 32. If the number of states are two small or two large the GPU efficiency may be poor.


Don't print any messages besides errors.


Nathan Morris

gmatrix documentation built on May 19, 2017, 11:43 a.m.

Search within the gmatrix package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.