Go to the documentation of this file.
21 namespace InferenceEngine {
36 using Ptr = std::shared_ptr<D3DContext>;
42 operator ID3D11Device*() {
43 return _ObjFromParams<ID3D11Device*, gpu_handle_param>(
getParams(),
60 using Ptr = std::shared_ptr<D3DBufferBlob>;
72 operator ID3D11Buffer*() {
73 return _ObjFromParams<ID3D11Buffer*, gpu_handle_param>(
getParams(),
90 using Ptr = std::shared_ptr<D3DSurface2DBlob>;
102 operator ID3D11Texture2D*() {
103 return _ObjFromParams<ID3D11Texture2D*, gpu_handle_param>(
getParams(),
113 return _ObjFromParams<uint32_t, uint32_t>(
getParams(),
124 auto casted = std::dynamic_pointer_cast<D3DContext>(ctx);
125 if (
nullptr == casted) {
137 Blob::Ptr y_blob = std::dynamic_pointer_cast<Blob>(casted->CreateBlob(
desc, blobParams));
142 Blob::Ptr uv_blob = std::dynamic_pointer_cast<Blob>(casted->CreateBlob(uvdesc, blobParams));
144 return InferenceEngine::make_shared_blob<NV12Blob>(y_blob, uv_blob);
155 return std::dynamic_pointer_cast<D3DContext>(core.CreateContext(deviceName, contextParams));
162 auto casted = std::dynamic_pointer_cast<D3DContext>(ctx);
163 if (
nullptr == casted) {
171 return std::dynamic_pointer_cast<D3DBufferBlob>(casted->CreateBlob(
desc, params));
184 auto casted = std::dynamic_pointer_cast<D3DContext>(ctx);
185 if (
nullptr == casted) {
193 return std::dynamic_pointer_cast<D3DSurface2DBlob>(casted->CreateBlob(
desc, params));
This class represents an abstraction for GPU plugin remote context which is shared with Direct3D 11 d...
Definition: gpu_context_api_dx.hpp:31
virtual ParamMap getParams() const =0
Returns a map of device-specific parameters required for low-level operations with underlying object....
This class represents Inference Engine Core entity.
Definition: ie_core.hpp:29
TensorDesc tensorDesc
The tensor descriptor of the given blob.
Definition: ie_blob.h:218
This class defines Tensor description.
Definition: ie_layouts.h:153
This class represents an abstraction for GPU plugin remote blob which can be shared with user-supplie...
Definition: gpu_context_api_ocl.hpp:132
D3DBufferBlob(const TensorDesc &tensorDesc)
Creates a D3DBufferBlob object with the specified dimensions and layout.
Definition: gpu_context_api_dx.hpp:66
std::shared_ptr< D3DBufferBlob > Ptr
A smart pointer to the D3DBufferBlob object.
Definition: gpu_context_api_dx.hpp:60
#define GPU_PARAM_VALUE(name)
Shortcut for defining configuration values.
Definition: gpu_params.hpp:32
D3DSurface2DBlob(const TensorDesc &tensorDesc)
Creates a D3DSurface2DBlob object with the specified dimensions and layout.
Definition: gpu_context_api_dx.hpp:96
This class represents an abstraction for GPU plugin remote blob which can be shared with user-supplie...
Definition: gpu_context_api_ocl.hpp:89
virtual ParamMap getParams() const =0
Returns a map of device-specific parameters required for low-level operations with underlying object....
std::map< std::string, Parameter > ParamMap
An std::map object containing low-level object parameters of classes that are derived from RemoteBlob...
Definition: ie_remote_context.hpp:26
uint32_t plane()
Returns plane ID of underlying video decoder surface, or 0 if no video surface was shared.
Definition: gpu_context_api_dx.hpp:112
std::shared_ptr< RemoteContext > Ptr
A smart pointer to the RemoteContext object.
Definition: ie_remote_context.hpp:99
std::shared_ptr< Blob > Ptr
A smart pointer containing Blob object.
Definition: ie_blob.h:43
#define GPU_PARAM_KEY(name)
Shortcut for defining configuration keys.
Definition: gpu_params.hpp:27
This class represents an abstraction for GPU plugin remote blob which is shared with Direct3D 11 buff...
Definition: gpu_context_api_dx.hpp:55
#define THROW_IE_EXCEPTION
A macro used to throw the exception with a notable description.
Definition: ie_exception.hpp:25
This class represents an abstraction for GPU plugin remote blob which is shared with Direct3D 11 2D t...
Definition: gpu_context_api_dx.hpp:85
Represents detailed information for an error.
Definition: ie_c_api.h:122
std::shared_ptr< D3DContext > Ptr
A smart pointer to the D3DContext object.
Definition: gpu_context_api_dx.hpp:36
std::shared_ptr< D3DSurface2DBlob > Ptr
A smart pointer to the D3DSurface2DBlob object.
Definition: gpu_context_api_dx.hpp:90
static Blob::Ptr make_shared_blob_nv12(size_t height, size_t width, RemoteContext::Ptr ctx, ID3D11Texture2D *nv12_surf)
This function is used to obtain a NV12 compound blob object from NV12 DXGI video decoder output....
Definition: gpu_context_api_dx.hpp:123
@ U8
Definition: ie_precision.hpp:34
static Blob::Ptr make_shared_blob(const TensorDesc &desc, RemoteContext::Ptr ctx, ID3D11Buffer *buffer)
This function is used to obtain remote blob object from ID3D11Buffer.
Definition: gpu_context_api_dx.hpp:161
static D3DContext::Ptr make_shared_context(Core &core, std::string deviceName, ID3D11Device *device)
This function is used to obtain remote context object from ID3D11Device.
Definition: gpu_context_api_dx.hpp:150
This class represents an abstraction for GPU plugin remote context which is shared with OpenCL contex...
Definition: gpu_context_api_ocl.hpp:33
a header that defines wrappers for internal GPU plugin-specific OpenCL context and OpenCL shared memo...
void * gpu_handle_param
Shortcut for defining a handle parameter.
Definition: gpu_params.hpp:20