dpnp.random.Philox4x3210¶
- class dpnp.random.Philox4x3210(seed=None, *, counter=None, key=None, device=None, sycl_queue=None)[source]¶
A Philox4x32-10 counter-based bit generator on the device.
The generator of Salmon et al. (2011), with a 64-bit key and a 128-bit counter, as implemented by the oneMKL device RNG API. It is not the same as
numpy.random.Philox, which is Philox4x64-10.- Parameters:
- seed{None, int, array_like[ints], SeedSequence}, optional
The entropy the key is derived from, unless key is given. See
dpnp.random.BitGenerator.Default:
None.- counter{None, int}, optional
The initial 128-bit counter.
Default:
None, which starts from 0.- key{None, int}, optional
The 64-bit key. Mutually exclusive with seed.
Default:
None, which derives the key from seed.- device{None, string, SyclDevice, SyclQueue, Device}, optional
-
Default:
None. - sycl_queue{None, SyclQueue}, optional
-
Default:
None.
Notes
Every call that produces
nvalues takesceil(n / 8)blocks of 2**64 counter values, one for each work-item of the kernel, and every work-item draws as many values as its rejection samplers need from its own block. Elementicomes from the blocki % ceil(n / 8), so the values depend on the output size: a draw is not a prefix of a larger one. 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.