.. _oneapi-mkl-rng-device-generate_single: oneapi::mkl::rng::device::generate_single ========================================= Entry point to obtain a single random number from a given vector engine with proper statistics of a given distribution. .. contents:: :local: :depth: 1 API *** Syntax ------ .. code-block:: cpp template typename Distr::result_type generate_single(Distr& distr, Engine& engine) Include Files ------------- - ``oneapi/mkl/rng/device.hpp`` Input Parameters ---------------- .. list-table:: :header-rows: 1 * - Name - Type - Description * - distr - Distr& - Distribution object. See :ref:`device-distributions` for details. * - engine - Engine& - Engine object. See :ref:`device-engines-basic-random-number-generators` for details. Output Parameters ----------------- .. list-table:: :header-rows: 1 * - Name - Type - Description * - result - typename ``Distr::result_type`` - Function returns a scalar random number, may be used for engines with ``vec_size`` > 1.