File TensorMap.h¶
↰ Parent directory (DlSystem)
Contents
Definition (DlSystem/TensorMap.h)¶
Includes¶
DlSystem/DlError.h(File DlError.h)DlSystem/ITensor.h(File ITensor.h)DlSystem/SnpeApiExportDefine.h(File SnpeApiExportDefine.h)DlSystem/StringList.h(File StringList.h)
Included By¶
Functions¶
Typedefs¶
Full File Listing¶
Typedefs
-
typedef void *Snpe_TensorMap_Handle_t¶
A typedef to indicate a SNPE Tensor Map handle
Functions
-
Snpe_TensorMap_Handle_t Snpe_TensorMap_Create()¶
Constructs a TensorMap and returns a handle to it
- Returns
the handle to the created TensorMap
-
Snpe_TensorMap_Handle_t Snpe_TensorMap_CreateCopy(Snpe_TensorMap_Handle_t tensorMapHandle)¶
Copy-Constructs a TensorMap and returns a handle to it
- Parameters
tensorMapHandle – the other TensorMap to copy
- Returns
the handle to the created TensorMap
-
Snpe_ErrorCode_t Snpe_TensorMap_Assign(Snpe_TensorMap_Handle_t srcHandle, Snpe_TensorMap_Handle_t dstHandle)¶
Copy-assigns the contents of srcHandle into dstHandle
- Parameters
src – Source TensorMap handle
dst – Destination TensorMap handle
- Returns
SNPE_SUCCESS on successful copy-assignment
-
Snpe_ErrorCode_t Snpe_TensorMap_Delete(Snpe_TensorMap_Handle_t handle)¶
Destroys/frees Tensor Map
- Parameters
handle – [in] : handle to tensorMap
- Returns
SNPE_SUCCESS if Delete operation successful.
-
void Snpe_TensorMap_Add(Snpe_TensorMap_Handle_t handle, const char *name, Snpe_ITensor_Handle_t tensorHandle)¶
Adds a name and the corresponding tensor pointer to the map.
- Parameters
handle – [in] : Handle to tensorMap
name – [in] : The name of the tensor
tensorHandle – [in] : Handle to access ITensor
Note
If a tensor with the same name already exists, the tensor is replaced with the existing tensor.
-
void Snpe_TensorMap_Remove(Snpe_TensorMap_Handle_t handle, const char *name)¶
Removes a mapping of tensor and its name by its name.
- Parameters
handle – [in] : Handle to tensorMap
name – [in] : The name of tensor to be removed
Note
If no tensor with the specified name is found, nothing is done.
-
size_t Snpe_TensorMap_Size(Snpe_TensorMap_Handle_t handle)¶
Returns the number of tensors in the map.
- Parameters
handle – [in] : Handle to tensorMap
- Returns
Number of tensors in the map
-
void Snpe_TensorMap_Clear(Snpe_TensorMap_Handle_t handle)¶
- Parameters
handle – [in] : Handle to tensorMap Removes all tensors from the map
-
Snpe_ITensor_Handle_t Snpe_TensorMap_GetTensor_Ref(Snpe_TensorMap_Handle_t handle, const char *name)¶
Returns the tensor given its name.
- Parameters
handle – [in] : Handle to tensorMap
name – [in] : The name of the tensor to get.
- Returns
nullptr if no tensor with the specified name is found; otherwise, a valid pointer to the tensor.
-
Snpe_StringList_Handle_t Snpe_TensorMap_GetTensorNames(Snpe_TensorMap_Handle_t handle)¶
- Parameters
handle – [in] : Handle to tensorMap
- Returns
A StringList of the names of all tensors