Functions
Blob

Functions

IEStatusCode ie_blob_make_memory (const tensor_desc_t *tensorDesc, ie_blob_t **blob)
 Creates a blob with the specified dimensions, layout and to allocate memory. More...
 
IEStatusCode ie_blob_make_memory_from_preallocated (const tensor_desc_t *tensorDesc, void *ptr, size_t size, ie_blob_t **blob)
 Creates a blob with the given tensor descriptor from the pointer to the pre-allocated memory. More...
 
IEStatusCode ie_blob_make_memory_with_roi (const ie_blob_t *inputBlob, const roi_t *roi, ie_blob_t **blob)
 Creates a blob describing given roi_t instance based on the given blob with pre-allocated memory. More...
 
IEStatusCode ie_blob_make_memory_nv12 (const ie_blob_t *y, const ie_blob_t *uv, ie_blob_t **nv12Blob)
 Creates a NV12 blob from two planes Y and UV. More...
 
IEStatusCode ie_blob_make_memory_i420 (const ie_blob_t *y, const ie_blob_t *u, const ie_blob_t *v, ie_blob_t **i420Blob)
 Creates I420 blob from three planes Y, U and V. More...
 
IEStatusCode ie_blob_size (ie_blob_t *blob, int *size_result)
 Gets the total number of elements, which is a product of all the dimensions. More...
 
IEStatusCode ie_blob_byte_size (ie_blob_t *blob, int *bsize_result)
 Gets the size of the current Blob in bytes. More...
 
void ie_blob_deallocate (ie_blob_t **blob)
 Releases previously allocated data. More...
 
IEStatusCode ie_blob_get_buffer (const ie_blob_t *blob, ie_blob_buffer_t *blob_buffer)
 Gets access to the allocated memory . More...
 
IEStatusCode ie_blob_get_cbuffer (const ie_blob_t *blob, ie_blob_buffer_t *blob_cbuffer)
 Gets read-only access to the allocated memory. More...
 
IEStatusCode ie_blob_get_dims (const ie_blob_t *blob, dimensions_t *dims_result)
 Gets dimensions of blob's tensor. More...
 
IEStatusCode ie_blob_get_layout (const ie_blob_t *blob, layout_e *layout_result)
 Gets layout of blob's tensor. More...
 
IEStatusCode ie_blob_get_precision (const ie_blob_t *blob, precision_e *prec_result)
 Gets precision of blob's tensor. More...
 
void ie_blob_free (ie_blob_t **blob)
 Releases the memory occupied by the ie_blob_t pointer. More...
 

Detailed Description

Set of functions allowing to research memory from infer requests or make new memory objects to be passed to InferRequests.

Function Documentation

◆ ie_blob_byte_size()

IEStatusCode ie_blob_byte_size ( ie_blob_t *  blob,
int *  bsize_result 
)

Gets the size of the current Blob in bytes.

Parameters
blobA pointer to the blob.
bsize_resultThe size of the current blob in bytes.
Returns
Status code of the operation: OK(0) for success.

◆ ie_blob_deallocate()

void ie_blob_deallocate ( ie_blob_t **  blob)

Releases previously allocated data.

Parameters
blobA pointer to the blob to free memory.

◆ ie_blob_free()

void ie_blob_free ( ie_blob_t **  blob)

Releases the memory occupied by the ie_blob_t pointer.

Parameters
blobA pointer to the blob pointer to release memory.

◆ ie_blob_get_buffer()

IEStatusCode ie_blob_get_buffer ( const ie_blob_t *  blob,
ie_blob_buffer_t blob_buffer 
)

Gets access to the allocated memory .

Parameters
blobA pointer to the blob.
blob_bufferA pointer to the copied data from the given blob.
Returns
Status code of the operation: OK(0) for success.

◆ ie_blob_get_cbuffer()

IEStatusCode ie_blob_get_cbuffer ( const ie_blob_t *  blob,
ie_blob_buffer_t blob_cbuffer 
)

Gets read-only access to the allocated memory.

Parameters
blobA pointer to the blob.
blob_cbufferA pointer to the coped data from the given pointer to the blob and the data is read-only.
Returns
Status code of the operation: OK(0) for success

◆ ie_blob_get_dims()

IEStatusCode ie_blob_get_dims ( const ie_blob_t *  blob,
dimensions_t dims_result 
)

Gets dimensions of blob's tensor.

Parameters
blobA pointer to the blob.
dims_resultA pointer to the dimensions of blob's tensor.
Returns
Status code of the operation: OK(0) for success.

◆ ie_blob_get_layout()

IEStatusCode ie_blob_get_layout ( const ie_blob_t *  blob,
layout_e layout_result 
)

Gets layout of blob's tensor.

Parameters
blobA pointer to the blob.
layout_resultA pointer to the layout of blob's tensor.
Returns
Status code of the operation: OK(0) for success.

◆ ie_blob_get_precision()

IEStatusCode ie_blob_get_precision ( const ie_blob_t *  blob,
precision_e prec_result 
)

Gets precision of blob's tensor.

Parameters
blobA pointer to the blob.
prec_resultA pointer to the precision of blob's tensor.
Returns
Status code of the operation: OK(0) for success.

◆ ie_blob_make_memory()

IEStatusCode ie_blob_make_memory ( const tensor_desc_t tensorDesc,
ie_blob_t **  blob 
)

Creates a blob with the specified dimensions, layout and to allocate memory.

Parameters
tensorDescTensor descriptor for Blob creation.
blobA pointer to the newly created blob.
Returns
Status code of the operation: OK(0) for success.

◆ ie_blob_make_memory_from_preallocated()

IEStatusCode ie_blob_make_memory_from_preallocated ( const tensor_desc_t tensorDesc,
void *  ptr,
size_t  size,
ie_blob_t **  blob 
)

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

Parameters
tensorDescTensor descriptor for Blob creation.
ptrPointer to the pre-allocated memory.
sizeLength of the pre-allocated array.
blobA pointer to the newly created blob.
Returns
Status code of the operation: OK(0) for success.

◆ ie_blob_make_memory_i420()

IEStatusCode ie_blob_make_memory_i420 ( const ie_blob_t *  y,
const ie_blob_t *  u,
const ie_blob_t *  v,
ie_blob_t **  i420Blob 
)

Creates I420 blob from three planes Y, U and V.

Parameters
yA pointer to the ie_blob_t instance that represents Y plane in I420 color format.
uA pointer to the ie_blob_t instance that represents U plane in I420 color format.
vA pointer to the ie_blob_t instance that represents V plane in I420 color format.
i420BlobA pointer to the newly created blob.
Returns
Status code of the operation: OK(0) for success.

◆ ie_blob_make_memory_nv12()

IEStatusCode ie_blob_make_memory_nv12 ( const ie_blob_t *  y,
const ie_blob_t *  uv,
ie_blob_t **  nv12Blob 
)

Creates a NV12 blob from two planes Y and UV.

Parameters
yA pointer to the ie_blob_t instance that represents Y plane in NV12 color format.
uvA pointer to the ie_blob_t instance that represents UV plane in NV12 color format.
nv12BlobA pointer to the newly created blob.
Returns
Status code of the operation: OK(0) for success.

◆ ie_blob_make_memory_with_roi()

IEStatusCode ie_blob_make_memory_with_roi ( const ie_blob_t *  inputBlob,
const roi_t roi,
ie_blob_t **  blob 
)

Creates a blob describing given roi_t instance based on the given blob with pre-allocated memory.

Parameters
inputBloboriginal blob with pre-allocated memory.
roiA roi_tinstance inside of the original blob.
blobA pointer to the newly created blob.
Returns
Status code of the operation: OK(0) for success.

◆ ie_blob_size()

IEStatusCode ie_blob_size ( ie_blob_t *  blob,
int *  size_result 
)

Gets the total number of elements, which is a product of all the dimensions.

Parameters
blobA pointer to the blob.
size_resultThe total number of elements.
Returns
Status code of the operation: OK(0) for success.