mrg32k3a#
The combined multiple recursive pseudorandom number generator MRG32k3a.
Description
MRG32k3a engine is a 32-bit combined multiple recursive generator with two components of order 3 [L’Ecuyer99a]. MRG32k3a combined generator meets the requirements for modern RNGs, such as good multidimensional uniformity, or a long period (
Generation algorithm
class mrg32k3a#
Syntax
namespace oneapi::math::rng {
class mrg32k3a {
public:
static constexpr std::uint32_t default_seed = 1;
mrg32k3a(sycl::queue queue, std::uint32_t seed = default_seed);
mrg32k3a(sycl::queue queue, std::initializer_list<std::uint32_t> seed);
mrg32k3a(const mrg32k3a& other);
mrg32k3a(mrg32k3a&& other);
mrg32k3a& operator=(const mrg32k3a& other);
mrg32k3a& operator=(mrg32k3a&& other);
~mrg32k3a();
};
}
Class Members
Routine |
Description |
---|---|
mrg32k3a(sycl::queue queue, std::uint32_t seed = default_seed) |
Constructor for common seed initialization of the engine |
mrg32k3a(sycl::queue queue, std::initializer_list<std::uint32_t> seed) |
Constructor for extended seed initialization of the engine |
Copy constructor |
|
Move constructor |
|
Copy assignment operator |
|
Move assignment operator |
Constructors
mrg32k3a::mrg32k3a(sycl::queue queue, std::uint32_t seed = default_seed)
Input Parameters
- queue
Valid
sycl::queue object
, calls of the oneapi::math::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
.
mrg32k3a::mrg32k3a(sycl::queue queue, std::initializer_list<std::uint32_t> seed)
Input Parameters
- queue
Valid
sycl::queue
object, calls of the oneapi::math::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
if
if
if
if the values prove to be
, assumeif the values prove to be
, assume
mrg32k3a::mrg32k3a(const mrg32k3a& other)
Input Parameters
- other
Valid
mrg32k3a
object. Thequeue
and state of the other engine is copied and applied to the current engine.
mrg32k3a::mrg32k3a(mrg32k3a&& other)
Input Parameters
- other
Valid
mrg32k3a
object. Thequeue
and state of the other engine is moved to the current engine.
mrg32k3a::mrg32k3a& operator=(const mrg32k3a& other)
Input Parameters
- other
Valid
mrg32k3a
object. Thequeue
and state of the other engine is copied and applied to the current engine.
mrg32k3a::mrg32k3a& operator=(mrg32k3a&& other)
Input Parameters
- other
Valid
mrg32k3a
r-value object. Thequeue
and state of the other engine is moved to the current engine.
Parent topic: Host Engines (Basic Random Number Generators)