aclrtGetBufData
Description
Obtains the data area pointer to and length of the shared buffer. You can use this pointer to fill in data.
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 memory. 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 acltdtAllocBuf or aclrtCopyBufRef. |
dataPtr |
Output |
Pointer to a data area (address on the device). |
size |
Output |
Length of the data area, in bytes. |
Returns
0 on success; else, failure. For details, see aclError.