Visible to Intel only — GUID: GUID-1ACDA56A-58FD-455B-A0B6-6468DE2AB68E
Visible to Intel only — GUID: GUID-1ACDA56A-58FD-455B-A0B6-6468DE2AB68E
engine_descriptor
Host side helper to provide an abstraction over sycl::buffer to initialize and store engines’ states between SYCL kernels.
Description
engine_descriptor provides an abstraction over sycl::buffer to initialize and store engines’ states between SYCL kernels.
API
Syntax
namespace oneapi::mkl::rng::device {
template<Engine>
class engine_descriptor {
public:
engine_descriptor(sycl::queue& queue, sycl::range<1> range, std::uint64_t seed, std::uint64_t offset);
template<typename InitEngineFunc>
engine_descriptor(sycl::queue& queue, sycl::range<1> range, InitEngineFunc func);
engine_accessor<Engine> get_access(sycl::handler& cgh);
};
}
Include Files
oneapi/mkl/rng/device.hpp
Template Parameters
Type |
Description |
---|---|
Engine |
Specify an engine which state is hold by engine descriptor. |
Constructors Input Parameters
Name |
Type |
Description |
---|---|---|
queue |
sycl::queue& |
sycl::queue object. Task is submitted to this queue to inlize engines’ states directly on the device which is associated wiueue. |
range |
sycl::range<1> |
Describes number of engines which are hold by this en_descriptor object. |
seed |
std::uint64_tstd::initializer_list<std::uint64_t> |
Initial conditions of the engine state. |
offset |
std::uint64_tstd::initializer_list<std::uint64_t> |
Number of skipped elements, for initializer_list offset is calculated as num_to_skip [0]+ num_to_skip [1]*264 + num_to_skip [2]* 2128 + … + num_to_skip [n-1]*264 *(n-1). |
func |
InitEngineFunc |
Functor which would be used to initialize engines. This functor should take sycl::item<1> as an argument and return object of type Engine. |