aclrtMemManagedPrefetchAsync
Note: This API is reserved and is not supported currently.
Function
Prefetches the unified virtual memory (UVM)
The memory operated by this API must be allocated using aclrtMemAllocManaged. This is an asynchronous API. A successful call only indicates that the task is successfully delivered, not executed. After calling this API, call the synchronization API (for example, aclrtSynchronizeStream) to ensure that the memory prefetch task is complete.
Prototype
1 | aclError aclrtMemManagedPrefetchAsync(const void* ptr, size_t size, aclrtMemManagedLocation location, uint32_t flags, aclrtStream stream) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
ptr |
Input |
Address of the memory to be prefetched. The address range must be within the UVM memory range, that is, [0x90000000000ULL, 0x90000000000ULL + 3 TB). |
size |
Input |
Length of the memory to be prefetched, in bytes. The value must be 2-MB aligned. The value range is (0, 3 TB]. |
location |
Input |
Location information of the physical memory. location contains two members: id and type. For details about the type definition, see aclrtMemManagedLocation. |
flags |
Input |
Reserved. The value is fixed at 0. |
stream |
Input |
Stream for executing the memory prefetch task. For details about the type definition, see aclrtStream. |
Returns
0 on success; otherwise, failure. For details, see aclError.