acltdtCopyBufRef

Performs reference copy on the data area of the shared buffer and creates and returns a new buffer management structure pointing to the same data area. This API is synchronous.

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

Restrictions

This API can be used only in open Ctrl CPU form or RC mode.

Prototype

aclError acltdtCopyBufRef(const acltdtBuf buf, acltdtBuf *newBuf)

Parameters

Parameter

Input/Output

Description

buf

Input

Pointer to the shared buffer, which must be obtained by calling acltdtAllocBuf or acltdtCopyBufRef.

newBuf

Output

A new shared buffer pointer, pointing to the same data area.

Returns

0 on success; else, failure.