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

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...

#include <gpu_context_api_ocl.hpp>

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

Public Types

using  Ptr = std::shared_ptr< ClBlob >
  A smart pointer to the ClBlob object.
 
- Public Types inherited from InferenceEngine::RemoteBlob
using  Ptr = std::shared_ptr< RemoteBlob >
  A smart pointer to the RemoteBlob object.
 
using  CPtr = std::shared_ptr< const RemoteBlob >
  A smart pointer to the const RemoteBlob object.
 
- Public Types inherited from InferenceEngine::MemoryBlob
using  Ptr = std::shared_ptr< MemoryBlob >
  A smart pointer to the MemoryBlob object.
 
using  CPtr = std::shared_ptr< const MemoryBlob >
  A smart pointer to the const MemoryBlob object.
 
- Public Types inherited from InferenceEngine::Blob
using  Ptr = std::shared_ptr< Blob >
  A smart pointer containing Blob object.
 
using  CPtr = std::shared_ptr< const Blob >
  A smart pointer to the const Blob object.
 

Public Member Functions

  ClBlob (const TensorDesc &tensorDesc)
  Creates a ClBlob object with the specified dimensions and layout. More...
 
- Public Member Functions inherited from InferenceEngine::RemoteBlob
virtual  ~RemoteBlob ()=default
  RemoteBlob virtual destructor.
 
  RemoteBlob (const TensorDesc &tensorDesc)
  Constructor. Creates an empty RemoteBlob object with the specified precision. More...
 
size_t  element_size () const noexcept override
  Returns the number of bytes per element.
 
virtual ParamMap  getParams () const =0
  Returns a map of device-specific parameters required for low-level operations with underlying object. Parameters include device/context/surface/buffer 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...
 
virtual std::string  getDeviceName () const noexcept=0
  Returns name of the device on which underlying object is allocated. Abstract method. More...
 
virtual std::shared_ptr< RemoteContext getContext () const noexcept=0
  Returns device context which underlying object belongs to. Abstract method. More...
 
- Public Member Functions inherited from InferenceEngine::MemoryBlob
virtual  ~MemoryBlob ()
  MemoryBlob virtual destructor.
 
  MemoryBlob (const TensorDesc &tensorDesc)
  Constructor. Creates an empty MemoryBlob object with the specified precision. More...
 
const TensorDesc getTensorDesc () const noexcept override
  Returns the tensor description.
 
TensorDesc getTensorDesc () noexcept override
  Returns the tensor description.
 
size_t  size () const noexcept override
  Returns the total number of elements, which is a product of all the dimensions.
 
size_t  byteSize () const noexcept override
  Returns the size of the current Blob in bytes.
 
void  allocate () noexcept override=0
  Allocates memory to store the data. More...
 
bool  deallocate () noexcept override=0
  Releases previously allocated data. More...
 
LockedMemory< void >  buffer () noexcept override=0
  Gets access to the allocated memory. More...
 
LockedMemory< const void >  cbuffer () const noexcept override=0
  Gets read-only access to the allocated memory. More...
 
virtual LockedMemory< void >  rwmap () noexcept=0
  Gets read/write access to the memory in virtual space of the process. The function returns object which retains mapped memory. The memory been addressed in the MemoryBlob in general case can be allocated on remote device. This function maps remote memory to the memory in the virtual process space and after destruction of the LockedMemory will upload changed content to the accelerator. More...
 
virtual LockedMemory< const void >  rmap () const noexcept=0
  Gets read only access to the memory in virtual space of the process. The function returns object which retains mapped memory. More...
 
virtual LockedMemory< void >  wmap () noexcept=0
  Gets "write only direction" access to the memory in virtual space of the process. The function returns object which retains memory to be uploaded on device. More...
 
- Public Member Functions inherited from InferenceEngine::Blob
virtual  ~Blob ()
  Blob 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< Blob, T >::value, int >::type = 0>
bool  is () noexcept
  Checks if the Blob 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< Blob, T >::value, int >::type = 0>
bool  is () const noexcept
  Checks if the Blob 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< Blob, T >::value, int >::type = 0>
T *  as () noexcept
  Casts this Blob 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< Blob, T >::value, int >::type = 0>
const T *  as () const noexcept
  Casts this Blob object to the type const T*. More...
 
  Blob (const TensorDesc &tensorDesc)
  Constructor. Creates an empty Blob object with the specified precision. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from InferenceEngine::Blob
static Ptr  CreateFromData (const DataPtr &data)
  Creates a TBlob<> object from a Data node. More...
 
- Protected Member Functions inherited from InferenceEngine::MemoryBlob
const std::shared_ptr< IAllocator > &  getAllocator () const noexcept override=0
  Gets the allocator for allocator-based blobs. More...
 
void *  getHandle () const noexcept override=0
  Gets the handle to allocated memory. More...
 
- Static Protected Member Functions inherited from InferenceEngine::Blob
static size_t  product (const SizeVector &dims) noexcept
  Multiplies the dimension vector values. More...
 
- Protected Attributes inherited from InferenceEngine::Blob
TensorDesc  tensorDesc
  The tensor descriptor of the given blob.
 

Detailed Description

The basic class for all GPU plugin remote blob objects. The OpenCL memory object handle (cl_mem) can be obtained from this class object.

Constructor & Destructor Documentation

§ ClBlob()

InferenceEngine::gpu::ClBlob::ClBlob ( const TensorDesc tensorDesc )
inlineexplicit

Creates a ClBlob object with the specified dimensions and layout.

Parameters
tensorDesc Tensor description

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