acltdtSetBufUserData

The Atlas Training Series Product does not support this API.

Description

Sets the data in the user data area of the shared buffer, and copies data from the user buffer to the specified offset position in the user data area to set control information for context transfer.

Restrictions

  • The default size of the shared buffer is 96 bytes. The sum of offset and size must be less than or equal to 96 bytes. Otherwise, an error is returned.
  • For the Atlas 200/300/500 Inference Product , this API can be used only in the following modes:

    Ascend RC Form

Prototype

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

Parameters

Parameter

Input/Output

Description

buf

Input

Pointer to the shared buffer, which 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

The value 0 indicates success, and other values indicate failure. For details, see aclError.

See Also

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