Initializes memory to a specified value. This API is asynchronous.
The system determines whether the memory to be initialized is on the host or device side based on the address.
This is an asynchronous call. A success response means that the request has been queued for processing. Following this API call, use an aclrtSynchronizeStream call to wait for memory initialization to complete.
aclError aclrtMemsetAsync(void *devPtr, size_t maxCount, int32_t value, size_t count, aclrtStream stream)
Parameter |
Input/Output |
Description |
|---|---|---|
devPtr |
Input |
Pointer to the memory start address. |
maxCount |
Input |
Memory size in bytes. |
value |
Input |
Value to set. |
count |
Input |
Memory size to set, in bytes. |
stream |
Input |
Stream. |
0 on success; else, failure.