.. _oneapi-mkl-rng-device-mrg32k3a: oneapi::mkl::rng::device::mrg32k3a ================================== .. contents:: :local: :depth: 1 Description *********** The combined multiple recursive pseudorandom number generator MRG32k3a [:ref:`L'Ecuyer99a`]. API *** Syntax ------ .. code-block:: cpp template class mrg32k3a { public: static constexpr std::uint32_t default_seed = 1; static constexpr std::int32_t vec_size = VecSize; mrg32k3a() : mrg32k3a(default_seed) {} mrg32k3a(std::uint32_t seed, std::uint64_t offset = 0); mrg32k3a(std::initializer_list seed, std::uint64_t offset = 0); mrg32k3a(std::uint32_t seed, std::initializer_list offset); mrg32k3a(std::initializer_list seed, std::initializer_list offset); }; Include Files ------------- - ``oneapi/mkl/rng/device.hpp`` Template Parameters ------------------- .. list-table:: :header-rows: 1 * - Name - Type - Description * - VecSize - ``std::int32_t`` - Describes the size of vector which 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 ----------------------------- .. list-table:: :header-rows: 1 * - Name - Type - Description * - seed - ``std::uint32_t`` ``std::initializer_list`` - Initial conditions of the engine state. * - offset - ``std::uint64_t`` ``std::initializer_list`` - number of skipped elements, for ``initializer_list`` offset is calculated as: ``num_to_skip`` [0]+ ``num_to_skip`` [1]*2\ :sup:`64` + ``num_to_skip`` [2]\* 2\ :sup:`128` + … + ``num_to_skip`` [``n``-1]\*2\ :sup:`64` \*(``n``-1). See :ref:`VS Notes` for detailed descriptions.