Developer Guide for Intel® Data Analytics Acceleration Library 2019 Update 5
Tensors provide interfaces for data management, such as memory allocation and deallocation, and respective methods for memory access and dimension management.
Use the getNumberOfDimensions() and getDimensions() methods to determine the number of dimensions and size of all dimensions, respectively.
Use the shuffleDimensions() method to change logical indexing of tensor dimensions without changing the data layout. This method changes the dimensions order, visible to algorithms.
Use the allocateDataMemory() and freeDataMemory() methods to allocate and deallocate memory needed to store the data associated with a given tensor. The dimensions and data associated with them determine the amount of memory required to store the data. The getDataMemoryStatus() method enables you to determine whether the memory is allocated by the allocateDataMemory() method, a user provided a pointer to the allocated data, or no data is currently associated with the tensor.
Use the assign method to initialize elements of a tensor with a certain value.
Use the resize() service method to allocate or reallocate the memory after the construction of the tensor. This method modifies the number of dimensions and their size according to the provided parameter and operates according to the description below:
The default data type for a homogeneous tensor is float.