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/detail/defines_elementary.hpp> // for __SYCL2020_DEPRECATED
12 #include <sycl/detail/property_helper.hpp> // for DataLessPropKind, Dat...
13 #include <sycl/properties/property_traits.hpp> // for is_property_of
14 
15 #include <type_traits> // for true_type
16 
17 namespace sycl {
18 inline namespace _V1 {
19 namespace ext::oneapi::cuda::property::context {
20 class __SYCL_DEPRECATED("the primary contexts are now always used")
21  use_primary_context : public ::sycl::detail::DataLessProperty<
22  ::sycl::detail::UsePrimaryContext> {};
23 } // namespace ext::oneapi::cuda::property::context
24 
25 namespace property::context {
26 namespace __SYCL2020_DEPRECATED(
27  "use 'sycl::ext::oneapi::cuda::property::context' instead") cuda {
28 class use_primary_context
29  : public ::sycl::ext::oneapi::cuda::property::context::use_primary_context {
30 };
31 // clang-format off
32 } // namespace cuda
33 // clang-format on
34 } // namespace property::context
35 
36 // Forward declaration
37 class context;
38 
39 // Context property trait specializations
40 template <>
41 struct is_property_of<property::context::cuda::use_primary_context, context>
42  : std::true_type {};
43 
44 template <>
45 struct is_property_of<ext::oneapi::cuda::property::context::use_primary_context,
46  context> : std::true_type {};
47 
48 } // namespace _V1
49 } // namespace sycl
The context class represents a SYCL context on which kernel functions may be executed.
Definition: context.hpp:51
#define __SYCL_DEPRECATED(message)
std::uint8_t instead
Definition: aliases.hpp:93
signed char __SYCL2020_DEPRECATED
Definition: aliases.hpp:94
Definition: access.hpp:18