mcg31m1#

Description#

The 31-bit multiplicative congruential pseudorandom number generator MCG(\(1132489760, 2^{32} - 1\)) [L’Ecuyer99a].

API#

Syntax#

namespace oneapi::mkl::rng {
  class mcg31m1 {
  public:
    static constexpr std::uint32_t default_seed = 1;

    mcg31m1(sycl::queue queue, std::uint32_t seed = default_seed);
    mcg31m1(const mcg31m1& other);
    mcg31m1(mcg31m1&& other);
    mcg31m1& operator=(const mcg31m1& other);
    mcg31m1& operator=(mcg31m1&& other);
    ~mcg31m1();
  };
}

Devices supported: CPU and GPU.

Include Files#

  • oneapi/mkl/rng.hpp

Input Parameters#

Name

Type

Description

queue

sycl::queue

Valid sycl::queue, calls of the oneapi::mkl::rng::generate() routine submits kernels in this queue.

seed

std::uint32_t

Initial conditions of the engine.

See VS Notes for the detailed descriptions.