aclrtGetBufUserData
Description
Obtains the data in 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
aclError aclrtGetBufUserData(const aclrtMbuf buf, void *dataPtr, size_t size, size_t offset)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
buf |
Input |
Shared buffer, which must be obtained by calling aclrtAllocBuf or aclrtCopyBufRef. |
dataPtr |
Output |
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; else, failure. For details, see aclError.