acltdtAllocBuf

Description

Allocates the shared buffer. This API is synchronous.

The Ascend 910 AI Processor does not support this API in the current version.

Restrictions

Prototype

aclError acltdtAllocBuf(size_t size, uint32_t type, acltdtBuf *buf)

Parameters

Parameter

Input/Output

Description

size

Input

Size of the requested data area, in bytes. The value cannot exceed 4 GB.

type

Input

Type of the shared buffer. The options are as follows:

typedef enum {
    ACL_TDT_NORMAL_MEM = 0,
    ACL_TDT_DVPP_MEM
} acltdtAllocBufType;

buf

Output

Pointer to the output shared buffer when the allocation is successful.

Returns

0 on success; else, failure.

See Also

For details about the API call sequence and example, see Shared Buffer Management.