TensorBufferMalloc

Function Usage

Obtains the memory of a TensorBuffer object.

The memory is automatically destroyed when the tensor object is destructed. Therefore, you do not need to destroy the memory by using the function.

Prototype

static APP_ERROR TensorBufferMalloc(TensorBuffer &buffer);

Parameter Description

Parameter

Input/Output

Description

buffer

Input

Obtains the TensorBuffer data of the corresponding memory.

Return Parameter Description

Data Structure

Description

APP_ERROR

Error code returned during program execution. For details, see the MxBase/ErrorCode/ErrorCode.h file.