Developer Reference

Contents

oneapi::mkl::rng::device::mcg31m1

Description

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

API

Syntax
template<std::int32_t VecSize = 1> class mcg31m1 { public: static constexpr std::uint32_t default_seed = 1; static constexpr std::int32_t vec_size = VecSize; mcg31m1() : mcg31m1(default_seed) {} mcg31m1(std::uint32_t seed, std::uint64_t offset = 0); mcg31m1(std::initializer_list<std::uint32_t> seed, std::uint64_t offset = 0); };
Include Files
  • oneapi/mkl/rng/device.hpp
Template Parameters
Name
Type
Description
VecSize
std::int32_t
Describes the size of vector that will be produced by generate function by this engine. VecSize values may be 1, 2, 3, 4, 8, 16 as
sycl::vec
class size. By default VecSize = 1, for this case, a single random number is returned by the
oneapi::mkl::rng::device::generate
function.
Constructors Input Parameters
Name
Type
Description
seed
std::uint32_t
std::initializer_list<std::uint32_t>
Initial conditions of the engine state.
offset
std::uint64_t
Number of skipped elements.
See VS Notes for detailed descriptions.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.