MxTensor

Description

Defines the tensor data information transferred between plugins in a stream.

Structure Definition

 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;
}

Parameters

Parameter

Input/Output

Description

tensorDataPtr

Input

Pointer to the tensor data.

tensorDataSize

Input

Data size of a tensor, in bytes.

deviceId

Input

ID of the device where a tensor is located.

memType

Input

Memory type of the data. For details, see MemoryData.

freeFunc

Input

Pointer to the tensor data destruction function.

tensorShape

Input

Shape information of a tensor.

dataStr

Input

Actual memory data of a tensor.

tensorDataType

Input

Tensor data type. For details, see MxDataType.