DPC++ Runtime
Runtime libraries for oneAPI DPC++
context_properties.hpp
Go to the documentation of this file.
1 //==----------- context_properties.hpp --- SYCL context properties ---------==//
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 
9 #pragma once
10 
11 #include <sycl/context.hpp>
14 
15 namespace sycl {
17 namespace ext {
18 namespace oneapi {
19 namespace cuda {
20 namespace property {
21 namespace context {
23  ::sycl::detail::UsePrimaryContext> {};
24 } // namespace context
25 } // namespace property
26 } // namespace cuda
27 } // namespace oneapi
28 } // namespace ext
29 
30 namespace property {
31 namespace context {
32 namespace __SYCL2020_DEPRECATED(
33  "use 'sycl::ext::oneapi::cuda::property::context' instead") cuda {
34 class use_primary_context
35  : public ::sycl::ext::oneapi::cuda::property::context::use_primary_context {
36 };
37 // clang-format off
38 } // namespace cuda
39 // clang-format on
40 } // namespace context
41 } // namespace property
42 
43 // Forward declaration
44 class context;
45 
46 // Context property trait specializations
47 template <>
48 struct is_property_of<property::context::cuda::use_primary_context, context>
49  : std::true_type {};
50 
51 template <>
52 struct is_property_of<ext::oneapi::cuda::property::context::use_primary_context,
53  context> : std::true_type {};
54 
55 } // __SYCL_INLINE_VER_NAMESPACE(_V1)
56 } // namespace sycl
The context class represents a SYCL context on which kernel functions may be executed.
Definition: context.hpp:41
#define __SYCL_INLINE_VER_NAMESPACE(X)
#define __SYCL2020_DEPRECATED(message)
std::uint8_t instead
Definition: aliases.hpp:69
---— Error handling, matching OpenCL plugin semantics.
Definition: access.hpp:14