Main Content


Random number generator algorithms on the GPU



parallel.gpu.RandStream.list lists the generator algorithms that can be used when creating a random number stream with parallel.gpu.RandStream or parallel.gpu.RandStream.create.


collapse all

When you use parallel.gpu.RandStream.list, MATLAB® displays a list of the available random number generators.

The following random number generator algorithms are available:
MRG32K3A:         Combined multiple recursive generator (supports parallel streams)
Philox4x32_10:    Philox 4x32 generator with 10 rounds (supports parallel streams)
Threefry4x64_20:  Threefry 4x64 generator with 20 rounds (supports parallel streams)

Each of these generators supports multiple parallel streams.

KeywordGeneratorMultiple Stream and Substream SupportApproximate Period in Full Precision
"Threefry" or "Threefry4x64_20"Threefry 4x64 generator with 20 roundsYes2514 (2256 streams of length 2258)
"Philox" or "Philox4x32_10"Philox 4x32 generator with 10 roundsYes2193 (264 streams of length 2129)
"CombRecursive" or "mrg32k3a"Combined multiple recursive generatorYes2191 (263 streams of length 2127)

For more information on the differences between generating random numbers on the GPU and CPU, see Random Number Streams on a GPU.

Version History

Introduced in R2011b