TensorDesc Overview

TensorDesc is used to store the tensor description obtained based on the index in ListTensorDesc.GetDesc().

Prototype

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
template<class T> class TensorDesc {
    TensorDesc();
    ~TensorDesc();
    void SetShapeAddr(uint64_t* shapePtr);
    uint64_t GetDim();
    uint64_t GetIndex();
    uint64_t GetShape(uint32_t offset);
    T* GetDataPtr();
    GlobalTensor<T> GetDataObj();
}

Template parameter

Table 1 Template parameters

Parameter

Description

T

Tensor data type.

Member Function

TensorDesc()
~TensorDesc()
void SetShapeAddr(uint64_t* shapePtr)
uint64_t GetDim()
uint64_t GetIndex()
uint64_t GetShape(uint32_t offset)
T* GetDataPtr()
GlobalTensor<T> GetDataObj()