Data Structures | Typedefs | Functions
ie_blob.h File Reference

A header file for Blob and generic TBlob<> More...

#include <memory>
#include <vector>
#include <string>
#include <numeric>
#include <cstring>
#include <utility>
#include <functional>
#include <map>
#include "ie_common.h"
#include "details/ie_exception.hpp"
#include "details/ie_blob_iterator.hpp"
#include "ie_allocator.hpp"
#include "ie_locked_memory.hpp"
#include "ie_precision.hpp"
#include "ie_layouts.h"
#include "details/ie_pre_allocator.hpp"

Go to the source code of this file.

Data Structures

class   InferenceEngine::Blob
  This class implements a container object that represents a tensor in memory (host and remote/accelerated) More...
 
class   InferenceEngine::TBlob< T, typename >
  Represents real host memory allocated for a Tensor/Blob per C type. More...
 
struct   InferenceEngine::ROI
  This structure describes ROI data. More...
 

Typedefs

using  InferenceEngine::BlobMap = std::map< std::string, Blob::Ptr >
  This is a convenient type for working with a map containing pairs(string, pointer to a Blob instance).
 

Functions

template<class Type >
TBlob< Type >::Ptr  InferenceEngine::make_shared_blob (Precision p, Layout l, const SizeVector &dims)
  Creates a blob with given precision and dimensions. More...
 
template<class Type >
TBlob< Type >::Ptr  InferenceEngine::make_shared_blob (Precision p, const SizeVector &dims)
  Creates a blob with the NCHW layout, given precision, and given dimensions. More...
 
template<typename Type , class TArg >
InferenceEngine::TBlob< Type >::Ptr  InferenceEngine::make_shared_blob (Precision p, Layout l, const TArg &arg)
  Creates a blob with the given precision. More...
 
template<typename Type , class TArg >
InferenceEngine::TBlob< Type >::Ptr  InferenceEngine::make_shared_blob (Precision p, const TArg &arg)
  Creates a blob with the NCHW layout and given tensor precision. More...
 
template<typename Type >
InferenceEngine::TBlob< Type >::Ptr  InferenceEngine::make_shared_blob (const TensorDesc &tensorDesc)
  Creates a blob with the given tensor descriptor. More...
 
template<typename Type >
InferenceEngine::TBlob< Type >::Ptr  InferenceEngine::make_shared_blob (const TensorDesc &tensorDesc, Type *ptr, size_t size=0)
  Creates a blob with the given tensor descriptor from the pointer to the pre-allocated memory. More...
 
template<typename TypeTo >
InferenceEngine::TBlob< TypeTo >::Ptr  InferenceEngine::make_shared_blob (TBlob< TypeTo > &&arg)
  Gets a shared pointer for the new TBlob instance. The created instance is based on move semantics from the given TBlob instance. More...
 
template<typename TypeTo >
InferenceEngine::TBlob< TypeTo >::Ptr  InferenceEngine::make_shared_blob (const TBlob< TypeTo > &arg)
  Creates a copy of given TBlob instance. More...
 
template<typename TypeTo >
InferenceEngine::TBlob< TypeTo >::Ptr  InferenceEngine::make_shared_blob (Precision p, Layout l=NCHW)
  Creates a blob with the given precision. More...
 
template<typename TypeTo >
TBlob< TypeTo >::Ptr  InferenceEngine::make_shared_blob (Precision p, Layout l, SizeVector dims, const std::vector< TypeTo > &arg)
  Creates a blob with the given precision, layout and dimensions from the vector of values. More...
 
template<typename TypeTo >
TBlob< TypeTo >::Ptr  InferenceEngine::make_shared_blob (Precision p, Layout l, const std::vector< TypeTo > &arg)
  Creates a blob with the given precision from the vector of values. More...
 
template<typename TypeTo >
TBlob< TypeTo >::Ptr  InferenceEngine::make_shared_blob (Precision p, const std::vector< TypeTo > &arg)
  Creates a blob with the NCHW layout and the given precision from the vector of values. More...
 
template<typename TypeTo >
TBlob< TypeTo >::Ptr  InferenceEngine::make_shared_blob (Precision p, Layout l, const SizeVector &dims, TypeTo *ptr, size_t size=0)
  Creates a blob with the given precision from the pointer to the pre-allocated memory. More...
 
template<typename TypeTo >
TBlob< TypeTo >::Ptr  InferenceEngine::make_shared_blob (Precision p, const SizeVector &dims, TypeTo *ptr, size_t size=0)
  Creates a blob with the NCHW layout and the given precision from the pointer to the pre-allocated memory. More...
 
Blob::Ptr  InferenceEngine::make_shared_blob (const Blob::Ptr &inputBlob, const ROI &roi)
  Creates a blob describing given ROI object based on the given blob with pre-allocated memory. More...
 

Detailed Description

A header file for Blob and generic TBlob<>

Function Documentation

§ make_shared_blob() [1/15]

template<class Type >
TBlob<Type>::Ptr InferenceEngine::make_shared_blob ( Precision  p,
Layout  l,
const SizeVector dims 
)
inline

Creates a blob with given precision and dimensions.

Deprecated:
Use TensorDesc to create Blob::Ptr.
Template Parameters
Type Type of the shared pointer to be created
Parameters
p Given precision
dims Given dimensions
Returns
A shared pointer to the created blob

§ make_shared_blob() [2/15]

template<class Type >
TBlob<Type>::Ptr InferenceEngine::make_shared_blob ( Precision  p,
const SizeVector dims 
)
inline

Creates a blob with the NCHW layout, given precision, and given dimensions.

Deprecated:
Use TensorDesc to create Blob::Ptr
Template Parameters
Type Type of the shared pointer to be created
Parameters
p Given precision
dims Given dimensions
Returns
A shared pointer to the created blob

§ make_shared_blob() [3/15]

template<typename Type , class TArg >
InferenceEngine::TBlob<Type>::Ptr InferenceEngine::make_shared_blob ( Precision  p,
Layout  l,
const TArg &  arg 
)
inline

Creates a blob with the given precision.

Deprecated:
Use TensorDesc to create Blob::Ptr
Template Parameters
Type Type of the shared pointer to be created
Parameters
p Given precision
arg Shared pointer to IAllocator to use in the blob
Returns
A shared pointer to the blob created

§ make_shared_blob() [4/15]

template<typename Type , class TArg >
InferenceEngine::TBlob<Type>::Ptr InferenceEngine::make_shared_blob ( Precision  p,
const TArg &  arg 
)
inline

Creates a blob with the NCHW layout and given tensor precision.

Deprecated:
Use TensorDesc in order to create Blob::Ptr
Template Parameters
Type Type of the shared pointer to be created
Parameters
p Given precision
arg Shared pointer to IAllocator to use in the blob
Returns
A shared pointer to the blob created

§ make_shared_blob() [5/15]

template<typename Type >
InferenceEngine::TBlob<Type>::Ptr InferenceEngine::make_shared_blob ( const TensorDesc tensorDesc )
inline

Creates a blob with the given tensor descriptor.

Template Parameters
Type Type of the shared pointer to be created
Parameters
tensorDesc Tensor descriptor for Blob creation
Returns
A shared pointer to the newly created blob of the given type

§ make_shared_blob() [6/15]

template<typename Type >
InferenceEngine::TBlob<Type>::Ptr InferenceEngine::make_shared_blob ( const TensorDesc tensorDesc,
Type *  ptr,
size_t  size = 0 
)
inline

Creates a blob with the given tensor descriptor from the pointer to the pre-allocated memory.

Template Parameters
Type Type of the shared pointer to be created
Parameters
tensorDesc TensorDesc for Blob creation
ptr Pointer to the pre-allocated memory
size Length of the pre-allocated array
Returns
A shared pointer to the newly created blob of the given type

§ make_shared_blob() [7/15]

template<typename TypeTo >
InferenceEngine::TBlob<TypeTo>::Ptr InferenceEngine::make_shared_blob ( TBlob< TypeTo > &&  arg )
inline

Gets a shared pointer for the new TBlob instance. The created instance is based on move semantics from the given TBlob instance.

Deprecated:
Use TensorDesc in order to create Blob::Ptr.
Template Parameters
TypeTo Type of the shared pointer to be created
Parameters
arg rvalue for the blob to move from
Returns
A shared pointer to the newly created blob of the given type

§ make_shared_blob() [8/15]

template<typename TypeTo >
InferenceEngine::TBlob<TypeTo>::Ptr InferenceEngine::make_shared_blob ( const TBlob< TypeTo > &  arg )
inline

Creates a copy of given TBlob instance.

Template Parameters
TypeTo Type of the shared pointer to be created
Parameters
arg given pointer to blob
Returns
A shared pointer to the newly created blob of the given type

§ make_shared_blob() [9/15]

template<typename TypeTo >
InferenceEngine::TBlob<TypeTo>::Ptr InferenceEngine::make_shared_blob ( Precision  p,
Layout  l = NCHW 
)
inline

Creates a blob with the given precision.

Deprecated:
Use TensorDesc in order to create Blob::Ptr.
Template Parameters
TypeTo Type of the shared pointer to be created
Parameters
p Given precision
Returns
A shared pointer to the blob created

§ make_shared_blob() [10/15]

template<typename TypeTo >
TBlob<TypeTo>::Ptr InferenceEngine::make_shared_blob ( Precision  p,
Layout  l,
SizeVector  dims,
const std::vector< TypeTo > &  arg 
)
inline

Creates a blob with the given precision, layout and dimensions from the vector of values.

Deprecated:
Use TensorDesc in order to create Blob::Ptr.
Template Parameters
TypeTo Type of the shared pointer to be created
Parameters
p Given precision
l Given Layout
dims Given dimensions
arg Vector of values
Returns
A shared pointer to the blob created

§ make_shared_blob() [11/15]

template<typename TypeTo >
TBlob<TypeTo>::Ptr InferenceEngine::make_shared_blob ( Precision  p,
Layout  l,
const std::vector< TypeTo > &  arg 
)
inline

Creates a blob with the given precision from the vector of values.

Deprecated:
Use TensorDesc in order to create Blob::Ptr.
Template Parameters
TypeTo Type of the shared pointer to be created
Parameters
p Given precision
l Layout
arg Vector of values
Returns
A shared pointer to the blob created

§ make_shared_blob() [12/15]

template<typename TypeTo >
TBlob<TypeTo>::Ptr InferenceEngine::make_shared_blob ( Precision  p,
const std::vector< TypeTo > &  arg 
)
inline

Creates a blob with the NCHW layout and the given precision from the vector of values.

Deprecated:
Use TensorDesc in order to create Blob::Ptr.
Template Parameters
TypeTo Type of the shared pointer to be created
Parameters
p Given precision
arg Vector of values
Returns
A shared pointer to the blob created

§ make_shared_blob() [13/15]

template<typename TypeTo >
TBlob<TypeTo>::Ptr InferenceEngine::make_shared_blob ( Precision  p,
Layout  l,
const SizeVector dims,
TypeTo *  ptr,
size_t  size = 0 
)
inline

Creates a blob with the given precision from the pointer to the pre-allocated memory.

Deprecated:
Use TensorDesc in order to create Blob::Ptr.
Parameters
p Given precision
l Layout
dims Given dimensions
ptr Pointer to the pre-allocated memory
size Length of the pre-allocated array
Returns
A shared pointer to the blob created

§ make_shared_blob() [14/15]

template<typename TypeTo >
TBlob<TypeTo>::Ptr InferenceEngine::make_shared_blob ( Precision  p,
const SizeVector dims,
TypeTo *  ptr,
size_t  size = 0 
)
inline

Creates a blob with the NCHW layout and the given precision from the pointer to the pre-allocated memory.

Deprecated:
Use TensorDesc in order to create Blob::Ptr.
Parameters
p Given precision
dims Given dimensions
ptr Pointer to the pre-allocated memory
size Length of the pre-allocated array
Returns
A shared pointer to the blob created

§ make_shared_blob() [15/15]

Blob::Ptr InferenceEngine::make_shared_blob ( const Blob::Ptr inputBlob,
const ROI roi 
)

Creates a blob describing given ROI object based on the given blob with pre-allocated memory.

Parameters
inputBlob original blob with pre-allocated memory.
roi A ROI object inside of the original blob.
Returns
A shared pointer to the newly created blob.