OpenCLMersenneTwister
OpenCLMersenneTwister[n]
generates n random reals using the Mersenne Twister algorithm.
Details and Options
- The OpenCLLink application must be loaded using Needs["OpenCLLink`"].
- The following options can be given:
-
"Device" Automatic device on which OpenCL computation is performed "Platform" Automatic platform on which OpenCL computation is performed "SeedFile" None file containing the initial state of the random number generator "SeedValue" Automatic seed value for the random number generator; a random integer is used if set to Automatic
Examples
open allclose allBasic Examples (4)
First, load the OpenCLLink application:
This generates 50 random reals:
This generates 50 random reals, setting the initial state from a file:
This generates 50 random reals, setting the seed value from an integer:
This generates 50 random reals, setting the seed value from an integer and the state from a file, returning the same random numbers on each call:
Text
Wolfram Research (2010), OpenCLMersenneTwister, Wolfram Language function, https://reference.wolfram.com/language/OpenCLLink/ref/OpenCLMersenneTwister.html.
CMS
Wolfram Language. 2010. "OpenCLMersenneTwister." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/OpenCLLink/ref/OpenCLMersenneTwister.html.
APA
Wolfram Language. (2010). OpenCLMersenneTwister. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/OpenCLLink/ref/OpenCLMersenneTwister.html