class InferenceEngine::gpu::ClContext¶
Overview¶
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>
class ClContext:
public InferenceEngine::RemoteContext,
public InferenceEngine::gpu::details::param_map_obj_getter
{
public:
// typedefs
typedef std::shared_ptr<ClContext> Ptr;
// methods
cl_context get();
operator cl_context ();
operator cl::Context ();
};
// direct descendants
class D3DContext;
class VAContext;
Inherited Members¶
public:
// typedefs
typedef std::shared_ptr<RemoteContext> Ptr;
typedef std::shared_ptr<const RemoteContext> CPtr;
// methods
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();
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;
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();
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;
virtual std::string getDeviceName() const = 0;
virtual RemoteBlob::Ptr CreateBlob(
const TensorDesc& tensorDesc,
const ParamMap& params = {}
) = 0;
virtual MemoryBlob::Ptr CreateHostBlob(const TensorDesc& tensorDesc);
virtual ParamMap getParams() const = 0;
Detailed Documentation¶
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.
Typedefs¶
typedef std::shared_ptr<ClContext> Ptr
A smart pointer to the ClContext object.
Methods¶
cl_context get()
Returns the underlying OpenCL context handle.
Returns:
cl_context
operator cl_context ()
OpenCL context handle conversion operator for the ClContext object.
Returns:
cl_context
operator cl::Context ()
Standard Khronos cl::Context wrapper conversion operator for the ClContext object.
Returns:
cl::Context
object