# File ITensor.h ↰ [Parent directory](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_dir_DlSystem.html#dir-dlsystem) (`DlSystem`) Contents - [Definition (`DlSystem/ITensor.h`)](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_file_DlSystem_ITensor_h.html#definition-dlsystem-itensor-h) - [Includes](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_file_DlSystem_ITensor_h.html#includes) - [Included By](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_file_DlSystem_ITensor_h.html#included-by) - [Functions](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_file_DlSystem_ITensor_h.html#functions) - [Typedefs](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_file_DlSystem_ITensor_h.html#typedefs) - [Full File Listing](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_file_DlSystem_ITensor_h.html#full-file-listing) ## Definition (`DlSystem/ITensor.h`) ## Includes - `DlSystem/DlError.h` ([File DlError.h](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_file_DlSystem_DlError_h.html#file-dlsystem-dlerror-h)) - `DlSystem/SnpeApiExportDefine.h` ([File SnpeApiExportDefine.h](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_file_DlSystem_SnpeApiExportDefine_h.html#file-dlsystem-snpeapiexportdefine-h)) - `DlSystem/TensorShape.h` ([File TensorShape.h](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_file_DlSystem_TensorShape_h.html#file-dlsystem-tensorshape-h)) - `stdint.h` ## Included By - [File TensorMap.h](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_file_DlSystem_TensorMap_h.html#file-dlsystem-tensormap-h) - [File SNPE.h](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_file_SNPE_SNPE_h.html#file-snpe-snpe-h) - [File SNPEUtil.h](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_file_SNPE_SNPEUtil_h.html#file-snpe-snpeutil-h) ## Functions - [Function Snpe\_ITensor\_Delete](https://docs.qualcomm.com/doc/80-63442-10/topic/function_ITensor_8h_1a6c766f59295cec033270a6b1a36ed08b.html#exhale-function-itensor-8h-1a6c766f59295cec033270a6b1a36ed08b) - [Function Snpe\_ITensor\_GetData](https://docs.qualcomm.com/doc/80-63442-10/topic/function_ITensor_8h_1aae36a709c07bdf53aeff9ab66246c34d.html#exhale-function-itensor-8h-1aae36a709c07bdf53aeff9ab66246c34d) - [Function Snpe\_ITensor\_GetDelta](https://docs.qualcomm.com/doc/80-63442-10/topic/function_ITensor_8h_1a7a4ae294d2c7679ccd4ea07795324375.html#exhale-function-itensor-8h-1a7a4ae294d2c7679ccd4ea07795324375) - [Function Snpe\_ITensor\_GetOffset](https://docs.qualcomm.com/doc/80-63442-10/topic/function_ITensor_8h_1af2ff8721a2e0fc80eb06aae76d22de8d.html#exhale-function-itensor-8h-1af2ff8721a2e0fc80eb06aae76d22de8d) - [Function Snpe\_ITensor\_GetShape](https://docs.qualcomm.com/doc/80-63442-10/topic/function_ITensor_8h_1abc5ce93952d58245d3cd09c777de327d.html#exhale-function-itensor-8h-1abc5ce93952d58245d3cd09c777de327d) - [Function Snpe\_ITensor\_GetSize](https://docs.qualcomm.com/doc/80-63442-10/topic/function_ITensor_8h_1aedf44777b964d1c6e50a64d26220280f.html#exhale-function-itensor-8h-1aedf44777b964d1c6e50a64d26220280f) - [Function Snpe\_ITensor\_IsQuantized](https://docs.qualcomm.com/doc/80-63442-10/topic/function_ITensor_8h_1af89910d0daa9297eaeb7d0bad57f0b5e.html#exhale-function-itensor-8h-1af89910d0daa9297eaeb7d0bad57f0b5e) ## Typedefs - [Typedef Snpe\_ITensor\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/typedef_ITensor_8h_1aac1985017a981e69e6a6efcf88f6ed34.html#exhale-typedef-itensor-8h-1aac1985017a981e69e6a6efcf88f6ed34) ## Full File Listing Typedefs - typedef void \*Snpe\_ITensor\_Handle\_t - Represents a tensor which holds n-dimensional data. It is important to understand how the tensor data is represented in memory relative to the tensor dimensions. Tensors store data in memory in row-major order (i.e. the last tensor dimension is the fastest varying one). For example, if you have a two dimensional tensor with 3 rows and 2 columns (i.e. the tensor dimensions are 3,2 as returned in tensor dimension vectors) with the following data in terms rows and columns: | 1 2 | | 3 4 | | 5 6 | This data would be stored in memory as 1,2,3,4,5,6. Functions - [Snpe\_ErrorCode\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/enum_DlError_8h_1aa40d44ade537087ac80f867eb4e7d50f.html#_CPPv416Snpe_ErrorCode_t) Snpe\_ITensor\_Delete([Snpe\_ITensor\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_file_DlSystem_ITensor_h.html#_CPPv421Snpe_ITensor_Handle_t) iTensorHandle) - Destroys/frees an ITensor - Parameters - **userBufferHandle** – **[in]** : Handle to access the IUserBuffer - Returns - SNPE\_SUCCESS if Delete operation successful. - void \*Snpe\_ITensor\_GetData([Snpe\_ITensor\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_file_DlSystem_ITensor_h.html#_CPPv421Snpe_ITensor_Handle_t) tensorHandle) - Returns a tensor iterator pointing to the beginning of the data in the tensor. - Parameters - **tensorHandle** – **[in]** : Handle to access ITensor - Returns - The tensor data as a void pointer. - [Snpe\_TensorShape\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_file_DlSystem_TensorShape_h.html#_CPPv425Snpe_TensorShape_Handle_t) Snpe\_ITensor\_GetShape([Snpe\_ITensor\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_file_DlSystem_ITensor_h.html#_CPPv421Snpe_ITensor_Handle_t) tensorHandle) - Gets the shape of this tensor. The last element of the vector represents the fastest varying dimension and the zeroth element represents the slowest varying dimension, etc. - Parameters - **tensorHandle** – **[in]** : Handle to access ITensor - Returns - A TensorShape handle holding the tensor dimensions. - size\_t Snpe\_ITensor\_GetSize([Snpe\_ITensor\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_file_DlSystem_ITensor_h.html#_CPPv421Snpe_ITensor_Handle_t) tensorHandle) - Returns the element size of the data in the tensor (discounting strides). This is how big a buffer would need to be to hold the tensor data contiguously in memory. - Parameters - **tensorHandle** – **[in]** : Handle to access ITensor - Returns - The size of the tensor (in elements). - int Snpe\_ITensor\_IsQuantized([Snpe\_ITensor\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_file_DlSystem_ITensor_h.html#_CPPv421Snpe_ITensor_Handle_t) tensorHandle) - - float Snpe\_ITensor\_GetDelta([Snpe\_ITensor\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_file_DlSystem_ITensor_h.html#_CPPv421Snpe_ITensor_Handle_t) tensorHandle) - - float Snpe\_ITensor\_GetOffset([Snpe\_ITensor\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/c_api-rst_file_DlSystem_ITensor_h.html#_CPPv421Snpe_ITensor_Handle_t) tensorHandle) - Last Published: Aug 06, 2026