DPC++ Runtime
Runtime libraries for oneAPI DPC++
usm_pointer_info.hpp
Go to the documentation of this file.
1 //==---- usm_pointer_info.hpp - SYCL USM pointer info queries --*- C++ -*---==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 // ===--------------------------------------------------------------------=== //
8 #pragma once
9 
10 #include <sycl/detail/export.hpp> // for __SYCL_EXPORT
11 #include <sycl/usm/usm_enums.hpp> // for alloc
12 
13 namespace sycl {
14 inline namespace _V1 {
15 
16 class device;
17 class context;
18 
19 // Pointer queries
24 __SYCL_EXPORT usm::alloc get_pointer_type(const void *ptr, const context &ctxt);
25 
31 __SYCL_EXPORT device get_pointer_device(const void *ptr, const context &ctxt);
32 
33 } // namespace _V1
34 } // namespace sycl
usm::alloc get_pointer_type(const void *ptr, const context &ctxt)
Query the allocation type from a USM pointer.
Definition: usm_impl.cpp:575
device get_pointer_device(const void *ptr, const context &ctxt)
Queries the device against which the pointer was allocated Throws an invalid_object_error if ptr is a...
Definition: usm_impl.cpp:626
Definition: access.hpp:18