Data Structures | Namespaces | Functions
gpu_context_api_ocl.hpp File Reference

a header that defines wrappers for internal GPU plugin-specific OpenCL context and OpenCL shared memory blobs More...

#include <memory>
#include <string>
#include "ie_compound_blob.h"
#include "ie_remote_context.hpp"
#include "ie_core.hpp"
#include "gpu/gpu_params.hpp"
#include "gpu/gpu_ocl_wrapper.hpp"
#include "gpu/details/gpu_context_helpers.hpp"

Go to the source code of this file.

Data Structures

class  InferenceEngine::gpu::ClContext
 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...
 
class  InferenceEngine::gpu::ClBlob
 The basic class for all GPU plugin remote blob objects. The OpenCL memory object handle (cl_mem) can be obtained from this class object. More...
 
class  InferenceEngine::gpu::ClBufferBlob
 This class represents an abstraction for GPU plugin remote blob which can be shared with user-supplied OpenCL buffer. The plugin object derived from this class can be obtained with CreateBlob() call. More...
 
class  InferenceEngine::gpu::ClImage2DBlob
 This class represents an abstraction for GPU plugin remote blob which can be shared with user-supplied OpenCL 2D Image. The plugin object derived from this class can be obtained with CreateBlob() call. More...
 

Namespaces

 InferenceEngine
 Inference Engine C++ API.
 

Functions

static Blob::Ptr InferenceEngine::gpu::make_shared_blob_nv12 (RemoteContext::Ptr ctx, cl::Image2D &nv12_image_plane_y, cl::Image2D &nv12_image_plane_uv)
 This function is used to construct a NV12 compound blob object from two cl::Image2D wrapper objects. The resulting compound contains two remote blobs for Y and UV planes of the surface. More...
 
static RemoteContext::Ptr InferenceEngine::gpu::make_shared_context (Core &core, std::string deviceName, cl_context ctx)
 This function is used to obtain remote context object from user-supplied OpenCL context handle. More...
 
static Blob::Ptr InferenceEngine::gpu::make_shared_blob (const TensorDesc &desc, ClContext::Ptr ctx)
 This function is used to create remote blob object within default GPU plugin OpenCL context. More...
 
static Blob::Ptr InferenceEngine::gpu::make_shared_blob (const TensorDesc &desc, RemoteContext::Ptr ctx, cl::Buffer &buffer)
 This function is used to obtain remote blob object from user-supplied cl::Buffer wrapper object. More...
 
static Blob::Ptr InferenceEngine::gpu::make_shared_blob (const TensorDesc &desc, RemoteContext::Ptr ctx, cl_mem buffer)
 This function is used to obtain remote blob object from user-supplied OpenCL buffer handle. More...
 
static Blob::Ptr InferenceEngine::gpu::make_shared_blob (const TensorDesc &desc, RemoteContext::Ptr ctx, cl::Image2D &image)
 This function is used to obtain remote blob object from user-supplied cl::Image2D wrapper object. More...
 

Detailed Description

a header that defines wrappers for internal GPU plugin-specific OpenCL context and OpenCL shared memory blobs

Function Documentation

◆ make_shared_blob() [1/4]

static Blob::Ptr InferenceEngine::gpu::make_shared_blob ( const TensorDesc desc,
ClContext::Ptr  ctx 
)
inlinestatic

This function is used to create remote blob object within default GPU plugin OpenCL context.

Parameters
descA tensor descriptor object representing remote blob configuration
ctxA remote context used to create remote blob
Returns
A remote blob instance

◆ make_shared_blob() [2/4]

static Blob::Ptr InferenceEngine::gpu::make_shared_blob ( const TensorDesc desc,
RemoteContext::Ptr  ctx,
cl::Buffer &  buffer 
)
inlinestatic

This function is used to obtain remote blob object from user-supplied cl::Buffer wrapper object.

Parameters
descA tensor descriptor object representing remote blob configuration
ctxA remote context used to create remote blob
bufferA cl::Buffer object wrapped by a remote blob
Returns
A remote blob instance

◆ make_shared_blob() [3/4]

static Blob::Ptr InferenceEngine::gpu::make_shared_blob ( const TensorDesc desc,
RemoteContext::Ptr  ctx,
cl::Image2D &  image 
)
inlinestatic

This function is used to obtain remote blob object from user-supplied cl::Image2D wrapper object.

Parameters
descA tensor descriptor object representing remote blob configuration
ctxA remote context used to create remote blob
bufferA cl::Image2D object wrapped by a remote blob
Returns
A remote blob instance

◆ make_shared_blob() [4/4]

static Blob::Ptr InferenceEngine::gpu::make_shared_blob ( const TensorDesc desc,
RemoteContext::Ptr  ctx,
cl_mem  buffer 
)
inlinestatic

This function is used to obtain remote blob object from user-supplied OpenCL buffer handle.

Parameters
descA tensor descriptor object representing remote blob configuration
ctxA remote context used to create remote blob
bufferA cl_mem object wrapped by a remote blob
Returns
A remote blob instance

◆ make_shared_blob_nv12()

static Blob::Ptr InferenceEngine::gpu::make_shared_blob_nv12 ( RemoteContext::Ptr  ctx,
cl::Image2D &  nv12_image_plane_y,
cl::Image2D &  nv12_image_plane_uv 
)
inlinestatic

This function is used to construct a NV12 compound blob object from two cl::Image2D wrapper objects. The resulting compound contains two remote blobs for Y and UV planes of the surface.

Parameters
ctxRemoteContext plugin object derived from ClContext class.
nv12_image_plane_ycl::Image2D object containing Y plane data.
nv12_image_plane_uvcl::Image2D object containing UV plane data.
Returns
A shared remote blob instance

◆ make_shared_context()

static RemoteContext::Ptr InferenceEngine::gpu::make_shared_context ( Core core,
std::string  deviceName,
cl_context  ctx 
)
inlinestatic

This function is used to obtain remote context object from user-supplied OpenCL context handle.

Parameters
coreA reference to Inference Engine Core object
deviceNameA name of device to create a remote context for
ctxA OpenCL context to be used to create shared remote context
Returns
A shared remote context instance