aclrtMemset
Description
Initializes memory to a specified value.
The system determines whether the memory to be initialized is on the host or device based on the address.
Restrictions
This API initializes the memory immediately. No implicit device synchronization or stream synchronization is performed within the function.
Prototype
aclError aclrtMemset(void *devPtr, size_t maxCount, int32_t value, size_t count)
Parameters
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. |
Returns
The value 0 indicates success, and other values indicate failure. For details, see aclError.
Parent topic: Memory Management