acltdtGetBufDataLen

Obtains the length of the valid data in the shared buffer. This API is synchronous.

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

Restrictions

This API is effective only after acltdtSetBufDataLen is called to set the length of the valid data in the shared buffer. Otherwise, the length obtained by calling this API is 0.

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

Prototype

aclError acltdtGetBufDataLen(const acltdtBuf buf, size_t *len)

Parameters

Parameter

Input/Output

Description

buf

Input

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

len

Output

Length of valid data, in bytes.

Returns

0 on success; else, failure.