acltdtGetBufUserData

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

☓

Atlas A3 training products/Atlas A3 inference products

☓

Atlas A2 training products/Atlas A2 inference products

☓

Atlas 200I/500 A2 inference products

√

Atlas inference products

☓

Atlas training products

☓

Function

Obtains the data from the user data area of the shared buffer, and copies the data to the buffer allocated by the user with offset. The default size of the user data area is 96 bytes. The sum of the offset and size must be less than or equal to 96 bytes. Otherwise, an error is returned.

Prototype

1
aclError acltdtGetBufUserData(const acltdtBuf buf, void *dataPtr, size_t size, size_t offset)

Parameters

Parameter

Input/Output

Description

buf

Input

Pointer to the shared buffer. For details about the type definition, see acltdtBuf.

The shared buffer must be obtained by calling acltdtAllocBuf or acltdtCopyBufRef.

dataPtr

Input

Pointer to the memory address for storing user data.

size

Input

Length of user data, in bytes.

The data size must be less than or equal to 96 bytes.

offset

Input

Address offset, in bytes.

The offset must be less than or equal to 96 bytes.

Returns

0 on success; otherwise, failure. For details, see aclError.