.. _oneapi-mkl-rng-device-generate: oneapi::mkl::rng::device::generate ================================== Entry point to obtain random numbers from a given engine with proper statistics of a given distribution. .. contents:: :local: :depth: 1 API *** Syntax ------ .. code-block:: cpp template auto generate(Distr& distr, Engine& engine) -> typename std::conditional>::type 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 des. * - 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 - ``sycl::vec`` or typename ``Distr::result_type`` - Function returns ``sycl::vec`` of type specified by the Distribution object and vector size specified by the Engine object filled with random numbers or a scalar random number in case ``vec_size`` =1.