aclrtMemsetAsync
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
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 based on the address. If the host memory is not allocated by calling an acl API (for example, aclrtMallocHost), undefined behavior will occur.
Prototype
aclError aclrtMemsetAsync(void *devPtr, size_t maxCount, int32_t value, size_t count, aclrtStream stream)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
devPtr |
Input |
Pointer to the memory start address. |
maxCount |
Input |
Maximum memory size, in bytes. |
value |
Input |
Value to set. |
count |
Input |
Memory size to set, in bytes. |
stream |
Input |
Stream for executing the memory initialization task. |
Returns
0 on success; else, failure. For details, see aclError.