-
Notifications
You must be signed in to change notification settings - Fork 0
Random Number Generators
The basis for the Kokkos Random Number Generators and their usage is outlined here.
The implementation of random number generators in Kokkos is based on two primary references (Marsaglia1, 2003; Vigna2, 2014). Marsaglia's paper introduces Xorshift (bit-shifts with exclusive ors) pseudorandom number generators and tests some non-linear transformations to improve their performance on standard test suites. In spite of less than desirable performance numbers statistically, he showed that these generators are very fast and can generate hundreds of millions of random numbers in very few clock cycles. Using the same 64-bit state as Marsaglia, Vigna made improved parameter selections than Marsaglia but still achieve "poor" results. Applying an invertible multiplication step (hinted at by Marsaglia and called a "scramble" by Vigna) and correcting/adding to Marsaglia's xorshift64 algorithms, much improved behavior on test suites and higher statistical quality was achieved. Vigna describes tests on 1024 and 4096-bit versions of these generators later in his experimental process.
Kokkos implements a 64-bit and 1024-bit (high-dimensional) version of the scrambled xorshift generators. Please refer to the above references for details of the algorithms.
1 George Marsaglia. 2003. XorshiftRNGs. Journal of Statistical Software 8, 14 (2003), 1-6.
2 Vigna, Sebastiano (2014). "An experimental exploration of Marsaglia's xorshift generators, scrambled“ ( http://arxiv.org/abs/1402.6246)
The Process, the Steps, are next.
Home:
- Introduction
- Machine Model
- Programming Model
- Compiling
- Initialization
- View
- Parallel Dispatch
- Hierarchical Parallelism
- Custom Reductions
- Atomic Operations
- Subviews
- Interoperability
- Kokkos and Virtual Functions
- Initialization and Finalization
- View
- Data Parallelism
- Execution Policies
- Spaces
- Task Parallelism
- Utilities
- STL Compatibility
- Numerics
- Detection Idiom