dpnp.random.PCG64DXSM¶
- class dpnp.random.PCG64DXSM(seed=None, *, device=None, sycl_queue=None)[source]¶
NumPy's PCG64DXSM bit generator on the device.
The permuted congruential generator of
numpy.random.PCG64DXSM, a 128-bit LCG with the DXSM output function. It is seeded and has its state as NumPy's, so the two can exchange states.- Parameters:
- seed{None, int, array_like[ints], SeedSequence}, optional
The entropy the state is derived from, as by
numpy.random.PCG64DXSM. Seedpnp.random.BitGenerator.Default:
None.- device{None, string, SyclDevice, SyclQueue, Device}, optional
-
Default:
None. - sycl_queue{None, SyclQueue}, optional
-
Default:
None.
Notes
The raw outputs of
random_raw(), the floating-point values ofdpnp.random.Generator.random()anddpnp.random.Generator.uniform(), anddpnp.random.Generator. bytes()take a fixed number of engine outputs for every value. They are drawn in the order of the stream, and are the same as NumPy's for the same state, where NumPy draws them with the same algorithm.Every other method is sampled as by
jumped(): each work-item of a call producingnvalues draws as many values as its rejection samplers need from its own stream, thew-th of which is that ofjumped(w), and the call advances the state asjumped(ceil(n / 8)), but keeps the 32-bit half NumPy buffers. The values therefore depend on the output size, and are not the same as NumPy'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.