Visible to Intel only — GUID: GUID-95FC920A-0E60-4AFF-AAAC-1C711957FE6D
Visible to Intel only — GUID: GUID-95FC920A-0E60-4AFF-AAAC-1C711957FE6D
generate
Entry point to obtain random numbers from a given engine with proper statistics of a given distribution.
API
Syntax
namespace oneapi::mkl::rng::device {
template<typename Distr, typename Engine>
auto generate(Distr& distr, Engine& engine) ->
typename std::conditional<Engine::vec_size == 1, typename Distr::result_type,
sycl::vec<typename Distr::result_type, Engine::vec_size>>::type
}
Include Files
oneapi/mkl/rng/device.hpp
Input Parameters
Name |
Type |
Description |
---|---|---|
distr |
Distr& |
Distribution object. See Device Distributions for details. |
engine |
Engine& |
Engine object. See Device Engines (Basic Random Number Generators) for details. |
Output Parameters
Name |
Type |
Description |
---|---|---|
result |
sycl::vec<typename Distr::result_type, Engine::vec_size> 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. |