get_pointer_device
sycl::device get_pointer_device(const void *ptr, const context &ctxt);
const void* ptr |
The pointer to query |
const sycl::context& ctxt |
The SYCL context to which the USM allocation belongs. |
Returns the device associated with the USM allocation. If ctxt is a host context, returns the host device in ctxt. If ptr is an allocation of type usm::alloc::host, returns the first device in ctxt. Throws an error if ptr is not a valid USM allocation.