DPC++ Runtime
Runtime libraries for oneAPI DPC++
queue_properties.hpp
Go to the documentation of this file.
1 //==----------- queue_properties.hpp --- SYCL queue 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
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 #define __SYCL_DATA_LESS_PROP(NS_QUALIFIER, PROP_NAME, ENUM_VAL) \
20  namespace NS_QUALIFIER { \
21  class PROP_NAME \
22  : public sycl::detail::DataLessProperty<sycl::detail::ENUM_VAL> {}; \
23  }
24 
25 #include <sycl/properties/queue_properties.def>
26 
27 namespace property ::queue {
28 namespace __SYCL2020_DEPRECATED(
29  "use 'sycl::ext::oneapi::cuda::property::queue' instead") cuda {
30 class use_default_stream
31  : public ::sycl::ext::oneapi::cuda::property::queue::use_default_stream {};
32 // clang-format off
33 } // namespace cuda
34 // clang-format on
35 } // namespace property::queue
36 
37 namespace ext::intel::property::queue {
39  sycl::detail::PropWithDataKind::QueueComputeIndex> {
40 public:
41  compute_index(int idx) : idx(idx) {}
42  int get_index() { return idx; }
43 
44 private:
45  int idx;
46 };
47 } // namespace ext::intel::property::queue
48 
49 // Queue property trait specializations.
50 class queue;
51 
52 #define __SYCL_MANUALLY_DEFINED_PROP(NS_QUALIFIER, PROP_NAME) \
53  template <> \
54  struct is_property_of<NS_QUALIFIER::PROP_NAME, queue> : std::true_type {};
55 #define __SYCL_DATA_LESS_PROP(NS_QUALIFIER, PROP_NAME, ENUM_VAL) \
56  __SYCL_MANUALLY_DEFINED_PROP(NS_QUALIFIER, PROP_NAME)
57 
58 #include <sycl/properties/queue_properties.def>
59 
60 } // namespace _V1
61 } // namespace sycl
Encapsulates a single SYCL queue which schedules kernels on a SYCL device.
Definition: queue.hpp:111
signed char __SYCL2020_DEPRECATED
Definition: aliases.hpp:94
std::uint8_t instead
Definition: aliases.hpp:93
Definition: access.hpp:18