aclrtSetBufDataLen
Description
Sets the length of the valid data in the shared buffer.
API call sequence: Call aclrtAllocBuf or aclrtCopyBufRef to allocate the shared buffer, call aclrtGetBufData to obtain the memory pointer and length of the shared buffer, and fill valid data in the buffer. Then, call aclrtSetBufDataLen to set the length of the valid data in the shared buffer to a value less than that obtained by aclrtGetBufData.
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
buf |
Input |
Shared buffer, which must be obtained by calling aclrtAllocBuf or aclrtCopyBufRef. |
len |
Input |
Length of valid data, in bytes. |
Returns
0 on success; else, failure. For details, see aclError.