wichmann_hill#
The wichmann_hill engine is the set of 273 Wichmann-Hill’s combined multiplicative congruential generators from NAG Numerical Libraries [NAG].
Description
The set of 372 different basic pseudorandom number generators wichmann_hill is the second basic generator in the NAG libraries.
Generation algorithm
The constants
class wichmann_hill#
Syntax
namespace oneapi::mkl::rng {
class wichmann_hill {
public:
static constexpr std::uint32_t default_seed = 1;
wichmann_hill(sycl::queue queue, std::uint32_t seed = default_seed);
wichmann_hill(sycl::queue queue, std::uint32_t seed, std::uint32_t engine_idx);
wichmann_hill(sycl::queue queue, std::initializer_list<std::uint32_t> seed);
wichmann_hill(sycl::queue queue, std::initializer_list<std::uint32_t> seed, std::uint32_t engine_idx);
wichmann_hill(const wichmann_hill& other);
wichmann_hill(wichmann_hill&& other);
wichmann_hill& operator=(const wichmann_hill& other);
wichmann_hill& operator=(wichmann_hill&& other);
~wichmann_hill();
};
}
Class Members
Routine |
Description |
---|---|
wichmann_hill(sycl::queue queue, std::uint32_t seed = default_seed) |
Constructor for common seed initialization of the engine (for this case multiple generators of the set would be used) |
wichmann_hill(sycl::queue queue, std::uint32_t seed, std::uint32_t engine_idx) |
Constructor for common seed initialization of the engine (for this case single generator of the set would be used) |
wichmann_hill(sycl::queue& queue, std::initializer_list<std::uint32_t> seed) |
Constructor for extended seed initialization of the engine (for this case multiple generators of the set would be used) |
Constructor for extended seed initialization of the engine (for this case single generator of the set would be used) |
|
Copy constructor |
|
Move constructor |
|
Copy assignment operator |
|
Move assignment operator |
Constructors
wichmann_hill::wichmann_hill(sycl::queue queue, std::uint32_t seed = default_seed)
Input Parameters
- queue
Valid
sycl::queue
object, 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 , assume .
wichmann_hill::wichmann_hill(sycl::queue queue, std::uint32_t seed, std::uint32_t engine_idx)
Input Parameters
- queue
Valid
sycl::queue
object, 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 , assume .- engine_idx
The index of the set 1, …, 273.
Throws
- oneapi::mkl::invalid_argument
Exception is thrown when
wichmann_hill::wichmann_hill(sycl::queue& queue, std::initializer_list<std::uint32_t> seed)
Input Parameters
- queue
Valid
sycl::queue
object, 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 , assume .if
.if
.if
.
wichmann_hill::wichmann_hill(sycl::queue& queue, std::initializer_list<std::uint32_t> seed, std::uint32_t engine_idx)
Input Parameters
- queue
Valid
sycl::queue
object, 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 , assume .if
.if
.if
.- engine_idx
The index of the set 1, …, 273.
wichmann_hill::wichmann_hill(const wichmann_hill& other)
Input Parameters
- other
Valid
wichmann_hill
object. Thequeue
and state of the other engine is copied and applied to the current engine.
wichmann_hill::wichmann_hill(wichmann_hill&& other)
Input Parameters
- other
Valid
wichmann_hill
object. Thequeue
and state of the other engine is moved to the current engine.
wichmann_hill::wichmann_hill& operator=(const wichmann_hill& other)
Input Parameters
- other
Valid
wichmann_hill
object. Thequeue
and state of the other engine is copied and applied to the current engine.
wichmann_hill::wichmann_hill& operator=(wichmann_hill&& other)
Input Parameters
- other
Valid
wichmann_hill
r-value object. Thequeue
and state of the other engine is moved to the current engine.
Parent topic: Host Engines (Basic Random Number Generators)