13
13
14
14
namespace sycl {
15
15
__SYCL_INLINE_VER_NAMESPACE (_V1) {
16
- namespace property ::queue {
17
- class in_order : public detail ::DataLessProperty<detail::InOrder> {};
18
- class enable_profiling
19
- : public detail::DataLessProperty<detail::QueueEnableProfiling> {};
20
- } // namespace property::queue
21
-
22
- namespace ext ::oneapi {
23
-
24
- namespace property ::queue {
25
- class discard_events
26
- : public ::sycl::detail::DataLessProperty<::sycl::detail::DiscardEvents> {};
27
-
28
- class priority_normal
29
- : public sycl::detail::DataLessProperty<sycl::detail::QueuePriorityNormal> {
30
- };
31
- class priority_low
32
- : public sycl::detail::DataLessProperty<sycl::detail::QueuePriorityLow> {};
33
- class priority_high
34
- : public sycl::detail::DataLessProperty<sycl::detail::QueuePriorityHigh> {};
35
-
36
- } // namespace property::queue
16
+ #define __SYCL_DATA_LESS_PROP (NS_QUALIFIER, PROP_NAME, ENUM_VAL ) \
17
+ namespace NS_QUALIFIER { \
18
+ class PROP_NAME \
19
+ : public sycl::detail::DataLessProperty<sycl::detail::ENUM_VAL> {}; \
20
+ }
37
21
38
- namespace cuda ::property::queue {
39
- class use_default_stream : public ::sycl::detail::DataLessProperty<
40
- ::sycl::detail::UseDefaultStream> {};
41
- } // namespace cuda::property::queue
42
- } // namespace ext::oneapi
22
+ #include < sycl/properties/queue_properties.def>
43
23
44
24
namespace property ::queue {
45
25
namespace __SYCL2020_DEPRECATED (
@@ -51,10 +31,7 @@ class use_default_stream
51
31
// clang-format on
52
32
} // namespace property::queue
53
33
54
- namespace ext {
55
- namespace intel {
56
- namespace property {
57
- namespace queue {
34
+ namespace ext ::intel::property::queue {
58
35
class compute_index : public sycl ::detail::PropertyWithData<
59
36
sycl::detail::PropWithDataKind::QueueComputeIndex> {
60
37
public:
@@ -64,41 +41,18 @@ class compute_index : public sycl::detail::PropertyWithData<
64
41
private:
65
42
int idx;
66
43
};
67
- } // namespace queue
68
- } // namespace property
69
- } // namespace intel
70
- } // namespace ext
44
+ } // namespace ext::intel::property::queue
71
45
72
- // Forward declaration
46
+ // Queue property trait specializations.
73
47
class queue ;
74
48
75
- // Queue property trait specializations
76
- template <>
77
- struct is_property_of <property::queue::in_order, queue> : std::true_type {};
78
- template <>
79
- struct is_property_of <property::queue::enable_profiling, queue>
80
- : std::true_type {};
81
- template <>
82
- struct is_property_of <ext::oneapi::property::queue::discard_events, queue>
83
- : std::true_type {};
84
- template <>
85
- struct is_property_of <ext::oneapi::property::queue::priority_normal, queue>
86
- : std::true_type {};
87
- template <>
88
- struct is_property_of <ext::oneapi::property::queue::priority_low, queue>
89
- : std::true_type {};
90
- template <>
91
- struct is_property_of <ext::oneapi::property::queue::priority_high, queue>
92
- : std::true_type {};
93
- template <>
94
- struct is_property_of <property::queue::cuda::use_default_stream, queue>
95
- : std::true_type {};
96
- template <>
97
- struct is_property_of <ext::oneapi::cuda::property::queue::use_default_stream,
98
- queue> : std::true_type {};
99
- template <>
100
- struct is_property_of <ext::intel::property::queue::compute_index, queue>
101
- : std::true_type {};
49
+ #define __SYCL_MANUALLY_DEFINED_PROP (NS_QUALIFIER, PROP_NAME ) \
50
+ template <> \
51
+ struct is_property_of <NS_QUALIFIER::PROP_NAME, queue> : std::true_type {};
52
+ #define __SYCL_DATA_LESS_PROP (NS_QUALIFIER, PROP_NAME, ENUM_VAL ) \
53
+ __SYCL_MANUALLY_DEFINED_PROP (NS_QUALIFIER, PROP_NAME)
54
+
55
+ #include < sycl/properties/queue_properties.def>
102
56
103
57
} // __SYCL_INLINE_VER_NAMESPACE(_V1)
104
58
} // namespace sycl
0 commit comments