Public Types | Public Member Functions
InferenceEngine::gpu::ClContext Class Reference

This class represents an abstraction for GPU plugin remote context which is shared with OpenCL context object. The plugin object derived from this class can be obtained either with GetContext() method of Executable network or using CreateContext() Core call. More...

#include <gpu_context_api_ocl.hpp>

Inheritance diagram for InferenceEngine::gpu::ClContext:
Inheritance graph
[legend]
Collaboration diagram for InferenceEngine::gpu::ClContext:
Collaboration graph
[legend]

Public Types

using  Ptr = std::shared_ptr< ClContext >
  A smart pointer to the ClContext object.
 
- Public Types inherited from InferenceEngine::RemoteContext
using  Ptr = std::shared_ptr< RemoteContext >
  A smart pointer to the RemoteContext object.
 
using  CPtr = std::shared_ptr< const RemoteContext >
  A smart pointer to the const RemoteContext object.
 

Public Member Functions

cl_context  get ()
  Returns the underlying OpenCL context handle.
 
  operator cl_context ()
  OpenCL context handle conversion operator for the ClContext object. More...
 
  operator cl::Context ()
  Standard Khronos cl::Context wrapper conversion operator for the ClContext object. More...
 
- Public Member Functions inherited from InferenceEngine::RemoteContext
virtual  ~RemoteContext ()=default
  RemoteContext virtual destructor.
 
template<typename T , typename std::enable_if<!std::is_pointer< T >::value &&!std::is_reference< T >::value, int >::type = 0, typename std::enable_if< std::is_base_of< RemoteContext, T >::value, int >::type = 0>
bool  is () noexcept
  Checks if the RemoteContext object can be cast to the type T*. More...
 
template<typename T , typename std::enable_if<!std::is_pointer< T >::value &&!std::is_reference< T >::value, int >::type = 0, typename std::enable_if< std::is_base_of< RemoteContext, T >::value, int >::type = 0>
bool  is () const noexcept
  Checks if the RemoteContext object can be cast to the type const T*. More...
 
template<typename T , typename std::enable_if<!std::is_pointer< T >::value &&!std::is_reference< T >::value, int >::type = 0, typename std::enable_if< std::is_base_of< RemoteContext, T >::value, int >::type = 0>
T *  as () noexcept
  Casts this RemoteContext object to the type T*. More...
 
template<typename T , typename std::enable_if<!std::is_pointer< T >::value &&!std::is_reference< T >::value, int >::type = 0, typename std::enable_if< std::is_base_of< RemoteContext, T >::value, int >::type = 0>
const T *  as () const noexcept
  Casts this RemoteContext object to the type const T*. More...
 
virtual std::string  getDeviceName () const noexcept=0
  Returns name of the device on which underlying object is allocated. Abstract method. More...
 
virtual RemoteBlob::Ptr  CreateBlob (const TensorDesc &tensorDesc, const ParamMap &params={})=0
  Allocates memory blob in device memory or wraps user-supplied memory handle using the specified tensor description and low-level device-specific parameters. Returns a pointer to the object which implements RemoteBlob interface. More...
 
virtual ParamMap  getParams () const =0
  Returns a map of device-specific parameters required for low-level operations with underlying object. Parameters include device/context handles, access flags, etc. Contents of the map returned depend on remote execution context that is currently set on the device (working scenario). Abstract method. More...
 

Additional Inherited Members

- Protected Member Functions inherited from InferenceEngine::gpu::details::param_map_obj_getter
template<typename Result , typename Tmp >
Result  _ObjFromParams (const ParamMap &params, const std::string &handle_Key, const std::string &type_Key, const std::string &obj_T1, const std::string &obj_T2="__") const
  Template function that returns specified object parameter typecasted to desired user type.
 
template<typename Result >
Result  _ObjFromParamSimple (const ParamMap &params, const std::string &handle_Key) const
  Same as _ObjFromParams(), but should be used if check for object type is not required.
 
std::string  _StrFromParams (const ParamMap &params, std::string Key) const
  Template function that extracts string value from map entry under specified key.
 

Detailed Description

This class represents an abstraction for GPU plugin remote context which is shared with OpenCL context object. The plugin object derived from this class can be obtained either with GetContext() method of Executable network or using CreateContext() Core call.

Member Function Documentation

§ operator cl::Context()

InferenceEngine::gpu::ClContext::operator cl::Context ( )
inline

Standard Khronos cl::Context wrapper conversion operator for the ClContext object.

Returns
cl::Context object

§ operator cl_context()

InferenceEngine::gpu::ClContext::operator cl_context ( )
inline

OpenCL context handle conversion operator for the ClContext object.

Returns
Underlying OpenCL context handle

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