MxTensor

功能

Stream流中插件之间流转的张量数据信息。

结构定义

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
struct MxTensor{ 
    uint64_t tensorDataPtr;
    int32_t tensorDataSize;
    uint32_t deviceId;
    MxBase::MemoryData::MemoryType memType;
    uint64_t freeFunc;
    std::vector<int32_t> tensorShape;
    std::string dataStr;
    int32_t tensorDataType;
}

参数说明

参数名

输入/输出

说明

tensorDataPtr

输入

张量信息的数据指针。

tensorDataSize

输入

张量信息的数据量(以字节为单位)。

deviceId

输入

张量所在的设备号。

memType

输入

数据的内存类型,参考MemoryData

freeFunc

输入

Tensor数据的释放函数的指针。

tensorShape

输入

张量的shape信息。

dataStr

输入

张量的实际内存数据。

tensorDatatype

输入

张量的数据类型,参考MxDataType