CreateDeviceBufferAndCopyData

Function Usage

Creates the MxpiBuffer (data structure transferred between plugins). This API allocates the host memory of a specified size based on the memory size specified by the user and device ID, copies the memory data transferred by the user to the device memory, and stores the device memory data, memory size, and device ID in the metadata.

Prototype

static MxpiBuffer* CreateDeviceBufferAndCopyData(const InputParam& inputParam);

Parameter Description

Parameter

Description

inputParam

Data structure defined by the Buffer API. For details, see InputParam. The value range of inputParam.dataSize is [1, 1073741824].

Return Parameter Description

Data Structure

Description

MxpiBuffer*

Data structure transferred between plugins. For details, see MxpiBuffer.