USM Info: get_pointer_type

get_pointer_type

usm::alloc get_pointer_type(const void *ptr, const context &ctxt);

Parameters

const void* ptr

The pointer to query

const sycl::context& ctxt

The SYCL context to which the USM allocation belongs

Return Value

Returns the USM allocation type for ptr if ptr falls inside a valid USM allocation. If ctxt is a host context, returns usm::alloc::host. Returns usm::alloc::unknown if ptr is not a valid USM allocation.