pcg64_dxsm#
Description#
A permuted congruential pseudorandom number generator PCG64 DXSM with a period of \(2^{128}\) [pcg2014].
Generation algorithm#
\(x_n = x_{n-1} \cdot a + b\)
\(hi_n = x_n \gg 64\)
\(lo_n = x_n \land \left(2^{64} - 1\right) \lor 1\)
\(hi_n = hi_n \oplus (hi_n \gg 32)\)
\(hi_n = hi_n \cdot a\)
\(hi_n = hi_n \oplus (hi_n \gg 48)\)
\(u_n = hi_n \cdot lo_n\)
\(a = \text{0xDA942042E4DD58B5}, b = \text{0x5851F42D4C957F2D14057B7EF767814F}\)
API#
Syntax#
namespace oneapi::mkl::rng::device {
template<std::int32_t VecSize = 1>
class pcg64_dxsm {
public:
static constexpr std::uint64_t default_seed = 0;
static constexpr std::int32_t vec_size = VecSize;
pcg64_dxsm() : pcg64_dxsm(default_seed) {}
pcg64_dxsm(std::uint64_t seed, std::uint64_t offset = 0);
pcg64_dxsm(std::initializer_list<std::uint64_t> seed, std::uint64_t offset = 0);
pcg64_dxsm(std::uint64_t seed, std::initializer_list<std::uint64_t> offset);
pcg64_dxsm(std::initializer_list<std::uint64_t> seed, std::initializer_list<std::uint64_t> offset);
};
}
Include Files#
oneapi/mkl/rng/device.hpp
Template Parameters#
Name |
Type |
Description |
|---|---|---|
VecSize |
|
Describes the size of the vector that will be produced by the generate function with this engine. VecSize values can be 1, 2, 3, 4, 8, or 16 as the |
Constructors Input Parameters#
Name |
Type |
Description |
|---|---|---|
seed |
|
Initial conditions of the 128 bit engine state. |
offset |
|
Number of skipped elements, for |
See VS Notes for detailed descriptions.