Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
InferenceEngine::CompoundBlob Class Reference

This class represents a blob that contains other blobs. More...

#include <ie_compound_blob.h>

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

Public Types

using Ptr = std::shared_ptr< CompoundBlob >
 A smart pointer to the CompoundBlob object.
 
using CPtr = std::shared_ptr< const CompoundBlob >
 A smart pointer to the const CompoundBlob 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

 CompoundBlob (const std::vector< Blob::Ptr > &blobs)
 Constructs a compound blob from a vector of blobs. More...
 
 CompoundBlob (std::vector< Blob::Ptr > &&blobs)
 Constructs a compound blob from a vector of blobs. More...
 
size_t byteSize () const noexcept override
 Always returns 0 More...
 
size_t element_size () const noexcept override
 Always returns 0 More...
 
void allocate () noexcept override
 No operation is performed. Compound blob does not allocate/deallocate any data.
 
bool deallocate () noexcept override
 No operation is performed. Compound blob does not allocate/deallocate any data. More...
 
LockedMemory< void > buffer () noexcept override
 Always returns an empty LockedMemory object.
 
LockedMemory< const void > cbuffer () const noexcept override
 Always returns an empty LockedMemory object.
 
size_t size () const noexcept override
 Returns the number of underlying blobs in the compound blob.
 
virtual Blob::Ptr getBlob (size_t i) const noexcept
 Returns an underlying blob at index i. More...
 
Blob::Ptr createROI (const ROI &roi) const override
 Creates a blob describing given ROI object based on the current blob with memory sharing. 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...
 
virtual const TensorDescgetTensorDesc () const noexcept
 Returns the tensor description. More...
 
virtual TensorDescgetTensorDesc () noexcept
 Returns the tensor description. More...
 

Protected Member Functions

 CompoundBlob (const TensorDesc &tensorDesc)
 Constructs a compound blob with specified descriptor. More...
 
const std::shared_ptr< IAllocator > & getAllocator () const noexcept override
 Returns nullptr as CompoundBlob is not allocator-based.
 
void * getHandle () const noexcept override
 Returns nullptr as CompoundBlob is not allocator-based.
 

Protected Attributes

std::vector< Blob::Ptr_blobs
 Compound blob container for underlying blobs.
 
- Protected Attributes inherited from InferenceEngine::Blob
TensorDesc tensorDesc
 The tensor descriptor of the given blob.
 

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...
 
- Static Protected Member Functions inherited from InferenceEngine::Blob
static size_t product (const SizeVector &dims) noexcept
 Multiplies the dimension vector values. More...
 

Detailed Description

This class represents a blob that contains other blobs.

Compound blob is a wrapper blob over references to underlying blobs. These blobs should share some properties and can be grouped into a single entity.

Constructor & Destructor Documentation

◆ CompoundBlob() [1/3]

InferenceEngine::CompoundBlob::CompoundBlob ( const std::vector< Blob::Ptr > &  blobs)
explicit

Constructs a compound blob from a vector of blobs.

Parameters
blobsA vector of blobs that is copied to this object

◆ CompoundBlob() [2/3]

InferenceEngine::CompoundBlob::CompoundBlob ( std::vector< Blob::Ptr > &&  blobs)
explicit

Constructs a compound blob from a vector of blobs.

Parameters
blobsA vector of blobs that is moved to this object

◆ CompoundBlob() [3/3]

InferenceEngine::CompoundBlob::CompoundBlob ( const TensorDesc tensorDesc)
explicitprotected

Constructs a compound blob with specified descriptor.

Parameters
tensorDescA tensor descriptor for the compound blob

Member Function Documentation

◆ byteSize()

size_t InferenceEngine::CompoundBlob::byteSize ( ) const
overridevirtualnoexcept

Always returns 0

Returns
Returns 0

Reimplemented from InferenceEngine::Blob.

◆ createROI()

Blob::Ptr InferenceEngine::CompoundBlob::createROI ( const ROI roi) const
overridevirtual

Creates a blob describing given ROI object based on the current blob with memory sharing.

Note: default implementation throws "not implemented" exception.

Parameters
roiA ROI object inside of the current blob.
Returns
A shared pointer to the newly created ROI blob.

Reimplemented from InferenceEngine::Blob.

Reimplemented in InferenceEngine::I420Blob, and InferenceEngine::NV12Blob.

◆ deallocate()

bool InferenceEngine::CompoundBlob::deallocate ( )
overridevirtualnoexcept

No operation is performed. Compound blob does not allocate/deallocate any data.

Returns
Returns false

Implements InferenceEngine::Blob.

◆ element_size()

size_t InferenceEngine::CompoundBlob::element_size ( ) const
overridevirtualnoexcept

Always returns 0

Returns
Returns 0

Implements InferenceEngine::Blob.

◆ getBlob()

virtual Blob::Ptr InferenceEngine::CompoundBlob::getBlob ( size_t  i) const
virtualnoexcept

Returns an underlying blob at index i.

Parameters
ithe index of the underlying Blob object
Returns
A smart pointer to the underlying Blob object or nullptr in case of an error

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