aclrtMemManagedAdvise
Note: This API is reserved and is not supported currently.
Function
Manages policy attributes of unified virtual memory (UVM). Policy attributes can be set and the settings can be canceled.
The memory operated by this API must be allocated by calling aclrtMemAllocManaged. The configured policy attribute values can be queried by calling aclrtMemManagedGetAttr and aclrtMemManagedGetAttrs.
Prototype
1 | aclError aclrtMemManagedAdvise(const void *const ptr, uint64_t size, aclrtMemManagedAdviseType advise, aclrtMemManagedLocation location) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
ptr |
Input |
Address of the memory whose attributes are to be set. The address range must be within the UVM memory range, that is, [0x90000000000ULL, 0x90000000000ULL + 3 TB). |
size |
Input |
Memory size, in bytes. The value must be 2-MB aligned. The value range is (0, 3 TB]. |
advise |
Input |
Memory policy attribute. For details about the type definition, see aclrtMemManagedAdviseType. |
location |
Input |
Location information of the physical memory. location contains two members: id and type. For details about the type definition, see aclrtMemManagedLocation. |
Returns
0 on success; otherwise, failure. For details, see aclError.