Public Types | Public Member Functions
InferenceEngine::RemoteBlob Class Referenceabstract

This class represents an Inference Engine abstraction to the memory allocated on the remote (non-CPU) accelerator device. More...

#include <ie_remote_context.hpp>

Inheritance diagram for InferenceEngine::RemoteBlob:
Inheritance graph
[legend]
Collaboration diagram for InferenceEngine::RemoteBlob:
Collaboration graph
[legend]

Public Types

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

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< RemoteContextgetContext () 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 TensorDescgetTensorDesc () const noexcept override
 Returns the tensor description.
 
TensorDescgetTensorDesc () 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 calculated as size() * element_size(). More...
 
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

This class represents an Inference Engine abstraction to the memory allocated on the remote (non-CPU) accelerator device.

Constructor & Destructor Documentation

§ RemoteBlob()

InferenceEngine::RemoteBlob::RemoteBlob ( const TensorDesc tensorDesc)
inlineexplicit

Constructor. Creates an empty RemoteBlob object with the specified precision.

Parameters
tensorDescDefines the layout and dims of the blob

Member Function Documentation

§ getContext()

virtual std::shared_ptr<RemoteContext> InferenceEngine::RemoteBlob::getContext ( ) const
pure virtualnoexcept

Returns device context which underlying object belongs to. Abstract method.

Returns
Pointer to plugin-specific context class object, which is derived from RemoteContext. Dynamic casting should be used if it is necessary to retrieve a pointer to original class.

§ getDeviceName()

virtual std::string InferenceEngine::RemoteBlob::getDeviceName ( ) const
pure virtualnoexcept

Returns name of the device on which underlying object is allocated. Abstract method.

Returns
A device name string in the same format as that in plugin metric.

§ getParams()

virtual ParamMap InferenceEngine::RemoteBlob::getParams ( ) const
pure virtual

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.

Returns
A map of name/parameter elements.

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