File TensorShapeMap.h

Parent directory (DlSystem)

Definition (DlSystem/TensorShapeMap.h)

Includes

Full File Listing

Typedefs

typedef void *Snpe_TensorShapeMap_Handle_t

A typedef to indicate a SNPE TensorShapeMap handle

Functions

Snpe_TensorShapeMap_Handle_t Snpe_TensorShapeMap_Create()

Constructs a TensorShapeMap and returns a handle to it

Returns

the handle to the created TensorShapeMap

Snpe_TensorShapeMap_Handle_t Snpe_TensorShapeMap_CreateCopy(Snpe_TensorShapeMap_Handle_t tsmHandle)

copy constructor.

Parameters

tsmHandle[in] : Handle to the other object to copy.

Returns

the handle to the created TensorShapeMap

Snpe_ErrorCode_t Snpe_TensorShapeMap_Delete(Snpe_TensorShapeMap_Handle_t tsmHandle)

Destroys/frees Tensor Shape Map

Parameters

tsmhandle[in] : handle to access Tensor Shape Map

Returns

SNPE_SUCCESS if Delete operation successful.

Snpe_ErrorCode_t Snpe_TensorShapeMap_Assign(Snpe_TensorShapeMap_Handle_t srcHandle, Snpe_TensorShapeMap_Handle_t dstHandle)

assignment operator. Copy-assigns from srcHandle to dstHandle

Parameters
  • srcHandle[in] : handle to source Tensor Shape Map object

  • dstHandle[out] : handle to destination Tensor Shape Map object

Returns

Returns SNPE_SUCCESS if Assignment successful

Snpe_ErrorCode_t Snpe_TensorShapeMap_Add(Snpe_TensorShapeMap_Handle_t tsmHandle, const char *name, Snpe_TensorShape_Handle_t tsHandle)

Adds a name and the corresponding tensor pointer to the map.

Parameters
  • tsmhandle[in] : handle to access Tensor Shape Map

  • name[in] The name of the tensor

  • tsHandle[in] : Handle to access Tensor Shape

Returns

Returns SNPE_SUCCESS if Add operation successful

Note

If a tensor with the same name already exists, no new tensor is added.

Snpe_ErrorCode_t Snpe_TensorShapeMap_Remove(Snpe_TensorShapeMap_Handle_t tsmHandle, const char *name)

Removes a mapping of tensor and its name by its name.

Parameters
  • tsmhandle[in] : handle to access Tensor Shape Map

  • name[in] The name of tensor to be removed

Returns

Returns SNPE_SUCCESS if Remove operation successful

Note

If no tensor with the specified name is found, nothing is done.

size_t Snpe_TensorShapeMap_Size(Snpe_TensorShapeMap_Handle_t tsmHandle)

Returns the number of tensors in the map.

Parameters

tsmhandle[in] : handle to access Tensor Shape Map

Returns

Returns number entries in TensorShapeMap

Snpe_ErrorCode_t Snpe_TensorShapeMap_Clear(Snpe_TensorShapeMap_Handle_t tsmHandle)

Removes all tensors from the map

Parameters

tsmhandle[in] : handle to access Tensor Shape Map

Returns

Returns SNPE_SUCCESS if Clear operation successful

Snpe_TensorShape_Handle_t Snpe_TensorShapeMap_GetTensorShape(Snpe_TensorShapeMap_Handle_t tsmHandle, const char *name)

Returns the tensor given its name.

Parameters
  • tsmhandle[in] : handle to access Tensor Shape Map

  • name[in] The name of the tensor to get.

Returns

nullptr if no tensor with the specified name is found; otherwise, a valid Tensor Shape Handle.

Snpe_StringList_Handle_t Snpe_TensorShapeMap_GetTensorShapeNames(Snpe_TensorShapeMap_Handle_t tsmHandle)
Parameters

tsmHandle[in] : handle to access Tensor Shape Map

Returns

A stringList Handle to access names of all tensor shapes