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. See dpnp.random.BitGenerator.

Default: None.

device{None, string, SyclDevice, SyclQueue, Device}, optional

See dpnp.random.BitGenerator.

Default: None.

sycl_queue{None, SyclQueue}, optional

See dpnp.random.BitGenerator.

Default: None.

Notes

The raw outputs of random_raw(), the floating-point values of dpnp.random.Generator.random() and dpnp.random.Generator.uniform(), and dpnp.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 producing n values draws as many values as its rejection samplers need from its own stream, the w-th of which is that of jumped(w), and the call advances the state as jumped(ceil(n / 8)), but keeps the 32-bit half NumPy buffers. The values therefore depend only on the state and the output size, and are the same on every device, but not the same as NumPy's.