dpnp.random.MRG32k3a¶
- class dpnp.random.MRG32k3a(seed=None, *, device=None, sycl_queue=None)[source]¶
An MRG32k3a combined multiple recursive bit generator on the device.
The generator of L'Ecuyer (1999), with a period of about 2**191, as implemented by the oneMKL device RNG API. Its state is two components of three 32-bit words each.
- Parameters:
- seed{None, int, array_like[ints], SeedSequence}, optional
The entropy the state is derived from. See
dpnp.random.BitGenerator.Default:
None.- device{None, string, SyclDevice, SyclQueue, Device}, optional
-
Default:
None. - sycl_queue{None, SyclQueue}, optional
-
Default:
None.
Notes
The engine gives values in
[1, 2**32 - 209], which are spread over the 32-bit range to give the raw 32-bit words, so that 209 words never occur. A raw 64-bit value is two words, the first in the high half.The stream is split into substreams of 2**76 values, as in L'Ecuyer et al. (2002). Every call that produces
nvalues takesceil(n / 128)substreams, one for each work-item of the kernel, and every work-item draws as many values as its rejection samplers need from its own substream. The values therefore depend on the output size, and are not the same as CuPy's. For a given state, output size and data type, the raw bits and the uniform floats are the same on every device, while the samplers built on transcendental functions agree to a few ULP, or differ where a rejection sampler then takes another candidate.References
[1]P. L'Ecuyer, "Good Parameters and Implementations for Combined Multiple Recursive Random Number Generators", Operations Research, 47(1), pp. 159-164, 1999.
[2]P. L'Ecuyer, R. Simard, E. J. Chen and W. D. Kelton, "An Object-Oriented Random-Number Package with Many Long Streams and Substreams", Operations Research, 50(6), pp. 1073-1075, 2002.