Functions
Blob creation and memory utilities

An extension for public Blob API allowing to create blobs in uniform manner. More...

Functions

InferenceEngine::Blob::Ptr make_blob_with_precision (const InferenceEngine::TensorDesc &desc)
 Creates Blob::Ptr with precision. More...
 
InferenceEngine::Blob::Ptr make_blob_with_precision (const InferenceEngine::TensorDesc &desc, void *ptr)
 Makes a blob with precision. More...
 
InferenceEngine::Blob::Ptr make_blob_with_precision (const InferenceEngine::TensorDesc &desc, const std::shared_ptr< InferenceEngine::IAllocator > &alloc)
 Makes a blob with precision. More...
 
InferenceEngine::Blob::Ptr make_plain_blob (InferenceEngine::Precision prec, const InferenceEngine::SizeVector dims)
 Creates a plain Blob::Ptr. More...
 
template<class... Args>
InferenceEngine::Blob::Ptr make_blob_with_precision (InferenceEngine::Precision precision, Args &&... args)
 Creates Blob::Ptr with precision. More...
 
template<typename T >
void CopyVectorToBlob (const InferenceEngine::Blob::Ptr outputBlob, const std::vector< T > &inputVector)
 Copy data from std::vector to Blob. More...
 
void InferenceEngine::blob_copy (Blob::Ptr src, Blob::Ptr dst)
 Copies data with taking into account layout and precision params. More...
 
int ie_memcpy (void *dest, size_t destsz, void const *src, size_t count)
 Copies bytes between buffers with security enhancements Copies count bytes from src to dest. If the source and destination overlap, the behavior is undefined. More...
 

Detailed Description

An extension for public Blob API allowing to create blobs in uniform manner.

Function Documentation

◆ blob_copy()

void InferenceEngine::blob_copy ( Blob::Ptr  src,
Blob::Ptr  dst 
)

Copies data with taking into account layout and precision params.

Parameters
[in]srcThe source Blob::Ptr
[in]dstThe destination Blob::Ptr

◆ CopyVectorToBlob()

template<typename T >
void CopyVectorToBlob ( const InferenceEngine::Blob::Ptr  outputBlob,
const std::vector< T > &  inputVector 
)

Copy data from std::vector to Blob.

Template Parameters
Ttype of data in std::vector
Parameters
outputBlobAn output blob to copy to
inputVectorAn input std::vector to copy from

◆ ie_memcpy()

int ie_memcpy ( void *  dest,
size_t  destsz,
void const *  src,
size_t  count 
)

Copies bytes between buffers with security enhancements Copies count bytes from src to dest. If the source and destination overlap, the behavior is undefined.

Parameters
destA Pointer to the object to copy to
destszA max number of bytes to modify in the destination (typically the size of the destination object)
srcA pointer to the object to copy from
countA number of bytes to copy
Returns
zero on success and non-zero value on error.

◆ make_blob_with_precision() [1/4]

InferenceEngine::Blob::Ptr make_blob_with_precision ( const InferenceEngine::TensorDesc desc)

Creates Blob::Ptr with precision.

Parameters
[in]descThe TensorDesc object
Returns
A Blob::Ptr pointer

◆ make_blob_with_precision() [2/4]

InferenceEngine::Blob::Ptr make_blob_with_precision ( const InferenceEngine::TensorDesc desc,
const std::shared_ptr< InferenceEngine::IAllocator > &  alloc 
)

Makes a blob with precision.

Parameters
[in]descThe description
[in]allocThe IAllocator object
Returns
A Blob::Ptr pointer

◆ make_blob_with_precision() [3/4]

InferenceEngine::Blob::Ptr make_blob_with_precision ( const InferenceEngine::TensorDesc desc,
void *  ptr 
)

Makes a blob with precision.

Parameters
[in]descThe TensorDesc object
ptrThe pointer to a raw memory
Returns
A Blob::Ptr pointer

◆ make_blob_with_precision() [4/4]

template<class... Args>
InferenceEngine::Blob::Ptr make_blob_with_precision ( InferenceEngine::Precision  precision,
Args &&...  args 
)

Creates Blob::Ptr with precision.

Parameters
[in]precisionThe precision
argsThe arguments
Template Parameters
ArgsVariadic template arguments
Returns
A Blob::Ptr pointer

◆ make_plain_blob()

Creates a plain Blob::Ptr.

Parameters
[in]precThe Precision value
[in]dimsThe dims
Returns
A Blob::Ptr pointer