aclrtMemsetD32
Applicable Products
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
☓ |
|
☓ |
|
☓ |
Function
Initializes memory, filling it with a specified 32-bit unsigned integer value. The difference between this API and aclrtMemset is that this API fills the memory in units of 32-bit unsigned integers, where N indicates the number of 32-bit unsigned integers to fill.
Prototype
1 | aclError aclrtMemsetD32(void *ptr, size_t memSize, uint32_t value, size_t N) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
ptr |
Input |
Pointer to the memory start address. The memory can only be allocated by the aclrtMallocHost or aclrtMalloc API. |
memSize |
Input |
Maximum memory length, in bytes (≥ N x 4). |
value |
Input |
32-bit unsigned integer to fill. |
N |
Input |
Number of 32-bit unsigned integers to fill. |
Returns
0 on success; otherwise, failure. For details, see aclError.
Restrictions
This API initializes the memory immediately. No implicit device synchronization or stream synchronization is performed within the function.