TensorMalloc
Function Usage
Allocates the tensor memory. The memory allocated by this API does not require user management, and is destroyed internally.
Prototype
static APP_ERROR TensorMalloc(Tensor &tensor)
Parameter Description
Parameter |
Input/Output |
Description |
|---|---|---|
tensor |
Output |
Tensor whose memory is to be allocated. Use the constructor that does not transfer memory to construct it. |
Return Parameter Description
Data Structure |
Description |
|---|---|
APP_ERROR |
Error code returned during program execution. For details, see the MxBase/ErrorCode/ErrorCode.h file. |
Parent topic: Tensor