philox4x32x10#
The Philox4x32x10 counter-based pseudorandom number generator.
Description
The Philox4x32x10 engine is a keyed family of generator of counter-based BRNG. The state consists of 128-bit integer counter
Generation algorithm
The generator has 32-bit integer output obtained in the following way [Salmon11]:
, where is a function that takes 128-bit argument and returns a 128-bit number. The returned number is obtained as follows:2.1. The argument
is interpreted as four 32-bit numbers , where , put .2.2. The following recurrence is calculated:
, where and are high and low parts of the product respectively.2.3. Put
, where
Integer output:
, where is the k-th 32-bit integer in quadrupleReal output:
class philox4x32x10#
Syntax
namespace oneapi::mkl::rng {
class philox4x32x10 {
public:
static constexpr std::uint64_t default_seed = 0;
philox4x32x10(sycl::queue queue, std::uint64_t seed = default_seed);
philox4x32x10(sycl::queue queue, std::initializer_list<std::uint64_t> seed);
philox4x32x10(const philox4x32x10& other);
philox4x32x10(philox4x32x10&& other);
philox4x32x10& operator=(const philox4x32x10& other);
philox4x32x10& operator=(philox4x32x10&& other);
~philox4x32x10();
};
}
Class Members
Routine |
Description |
|---|---|
philox4x32x10(sycl::queue queue, std::uint64_t seed = default_seed) |
Constructor for common seed initialization of the engine |
philox4x32x10(sycl::queue queue, std::initializer_list<std::uint64_t> seed) |
Constructor for extended seed initialization of the engine |
Copy constructor |
|
Move constructor |
|
Copy assignment operator |
|
Move assignment operator |
Constructors
philox4x32x10::philox4x32x10(sycl::queue queue, std::uint64_t seed = default_seed)
Input Parameters
- queue
Valid
sycl::queueobject, calls of the oneapi::mkl::rng::generate() routine submits kernels in this queue to obtain random numbers from a given engine.- seed
The initial conditions of the generator state, assume
, where is a 64-bit key, is a 128-bit counter.
philox4x32x10::philox4x32x10(sycl::queue queue, std::initializer_list<std::uint64_t> seed)
Input Parameters
- queue
Valid
sycl::queueobject, calls of the oneapi::mkl::rng::generate() routine submits kernels in this queue to obtain random numbers from a given engine.- seed
The initial conditions of the generator state, assume if
if
if
if
for
following arguments are ignored
philox4x32x10::philox4x32x10(const philox4x32x10& other)
Input Parameters
- other
Valid
philox4x32x10object. Thequeueand state of the other engine is copied and applied to the current engine.
philox4x32x10::philox4x32x10(philox4x32x10&& other)
Input Parameters
- other
Valid
philox4x32x10r-value object. Thequeueand state of the other engine is moved to the current engine.
philox4x32x10::philox4x32x10& operator=(const philox4x32x10& other)
Input Parameters
- other
Valid
philox4x32x10object. Thequeueand state of the other engine is copied and applied to the current engine.
philox4x32x10::philox4x32x10& operator=(philox4x32x10&& other)
Input Parameters
- other
Valid
philox4x32x10r-value object. Thequeueand state of the other engine is moved to the current engine.
Parent topic: Host Engines (Basic Random Number Generators)