Intel clGPU
engine Struct Referenceabstract

Base class for execution engines. More...

#include <engine.hpp>

Public Member Functions

virtual primitive_dbget_primitive_db ()=0
 Return engine-specific kernels DB.
 
virtual std::shared_ptr< kernel_commandget_kernel (const std::string &name, const std::string &module=std::string())=0
 Create kernel command. More...
 
virtual std::shared_ptr< buffercreate_buffer (size_t size, void *ptr=nullptr)=0
 Create memory buffer within the engine. More...
 
virtual std::shared_ptr< raise_event_commandget_raise_event_command ()=0
 Create raise event command.
 
virtual std::shared_ptr< commands_sequenceget_commands_sequence (const std::vector< std::shared_ptr< command >> &commands={})=0
 Create command sequence. More...
 
virtual std::shared_ptr< commands_parallelget_commands_parallel (const std::vector< std::shared_ptr< command >> &commands={})=0
 Create set of parrallel executed commands. More...
 
template<typename T = char>
std::shared_ptr< buffer_bindingget_temp_buffer (size_t num)
 Create temporary buffer with num elements of T.
 

Static Public Member Functions

template<typename T , direction Dir>
static auto get_input_buffer (const blob< T, Dir > &blob, size_t num) -> typename std::enable_if<(Dir &input) !=0
 Get input buffer binding from Blob object.
 
template<typename T , direction Dir>
static auto get_output_buffer (const blob< T, Dir > &blob, size_t num) -> typename std::enable_if<(Dir &output) !=0
 Get output buffer binding from Blob object.
 
template<typename T , direction Dir>
static auto get_inout_buffer (const blob< T, Dir > &blob, size_t num) -> typename std::enable_if< Dir==inout, std::shared_ptr< buffer_binding >>::type
 Get in-out buffer binding from Blob object.
 

Detailed Description

Base class for execution engines.

Definition at line 352 of file engine.hpp.

Member Function Documentation

◆ create_buffer()

virtual std::shared_ptr<buffer> create_buffer ( size_t  size,
void *  ptr = nullptr 
)
pure virtual

Create memory buffer within the engine.

Parameters
sizeRequested buffer size
ptr(optional) Raw pointer from which data should be copied to memory buffer

◆ get_commands_parallel()

virtual std::shared_ptr<commands_parallel> get_commands_parallel ( const std::vector< std::shared_ptr< command >> &  commands = {})
pure virtual

Create set of parrallel executed commands.

Parameters
commands(optional) Commands can be executed in parallel

◆ get_commands_sequence()

virtual std::shared_ptr<commands_sequence> get_commands_sequence ( const std::vector< std::shared_ptr< command >> &  commands = {})
pure virtual

Create command sequence.

Parameters
commands(optional) Commands to be added into the sequence

◆ get_kernel()

virtual std::shared_ptr<kernel_command> get_kernel ( const std::string &  name,
const std::string &  module = std::string() 
)
pure virtual

Create kernel command.

Parameters
nameKernel name
module(optional) Module name in which kernel is defined

The documentation for this struct was generated from the following file: