Programmers may provide hints to the runtime that data should be made available on a device earlier than Unified Shared Memory would normally require. This can be accomplished by enqueueing prefetch commands.
Prefetch commands may not be overlapped with kernel execution in Restricted USM.
prefetch
class handler { ... public: ... void prefetch(const void* ptr, size_t num_bytes); }; class queue { ... public: ... void prefetch(const void* ptr, size_t num_bytes); };
const void* ptr |
Pointer to the memory to be prefetched to the device |
size_t num_bytes |
Number of bytes requested to be prefetched |
None