Class InferenceEngine::CompoundBlob

class CompoundBlob : public InferenceEngine::Blob

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.

Subclassed by InferenceEngine::BatchedBlob

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 Functions

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

Constructs a compound blob from a vector of blobs.

Parameters

blobs – A vector of blobs that is copied to this object

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

Constructs a compound blob from a vector of blobs.

Parameters

blobs – A vector of blobs that is moved to this object

virtual size_t byteSize() const override

Always returns 0

Returns

Returns 0

virtual size_t element_size() const override

Always returns 0

Returns

Returns 0

virtual void allocate() noexcept override

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

virtual bool deallocate() noexcept override

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

Returns

Returns false

virtual size_t size() const noexcept override

Returns the number of underlying blobs in the compound blob.

Returns

A number of underlying blobs

virtual Blob::Ptr getBlob(size_t i) const noexcept

Returns an underlying blob at index i.

Parameters

i – the index of the underlying Blob object

Returns

A smart pointer to the underlying Blob object or nullptr in case of an error

virtual Blob::Ptr createROI(const ROI &roi) const override

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

Note: default implementation throws “not implemented” exception.

Parameters

roi – A ROI object inside of the current blob.

Returns

A shared pointer to the newly created ROI blob.