简介
TensorDesc用于储存ListTensorDesc.GetDesc()中根据index获取对应的Tensor描述信息。
原型定义
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(); } |
模板参数
参数名 |
描述 |
---|---|
T |
Tensor数据类型。 |
成员函数
TensorDesc() ~TensorDesc() void SetShapeAddr(uint64_t* shapePtr) uint64_t GetDim() uint64_t GetIndex() uint64_t GetShape(uint32_t offset) T* GetDataPtr() GlobalTensor<T> GetDataObj()
父主题: TensorDesc