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 
32 __SYCL_EXPORT device get_pointer_device(const void *ptr, const context &ctxt);
33 
34 } // namespace _V1
35 } // 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:544
device get_pointer_device(const void *ptr, const context &ctxt)
Queries the device against which the pointer was allocated Throws an exception with errc::invalid err...
Definition: usm_impl.cpp:592
Definition: access.hpp:18