13 #include <type_traits>
23 inline namespace _V1 {
46 #define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) \
47 template <> struct PiInfoCode<info::DescType::Desc> { \
48 static constexpr pi_##DescType##_info value = PiCode; \
51 struct is_##DescType##_info_desc<info::DescType::Desc> : std::true_type { \
52 using return_type = info::DescType::Desc::return_type; \
54 #include <sycl/info/context_traits.def>
55 #include <sycl/info/event_traits.def>
56 #include <sycl/info/kernel_traits.def>
57 #include <sycl/info/platform_traits.def>
58 #include <sycl/info/queue_traits.def>
59 #undef __SYCL_PARAM_TRAITS_SPEC
60 #define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) \
61 template <> struct PiInfoCode<info::DescType::Desc> { \
62 static constexpr pi_profiling_info value = PiCode; \
65 struct is_##DescType##_info_desc<info::DescType::Desc> : std::true_type { \
66 using return_type = info::DescType::Desc::return_type; \
68 #include <sycl/info/event_profiling_traits.def>
69 #undef __SYCL_PARAM_TRAITS_SPEC
85 #define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) \
86 template <> struct PiInfoCode<info::DescType::Desc> { \
88 typename std::conditional<IsSubGroupInfo<info::DescType::Desc>::value, \
89 pi_kernel_sub_group_info, \
90 pi_kernel_group_info>::type value = PiCode; \
93 struct is_##DescType##_info_desc<info::DescType::Desc> : std::true_type { \
94 using return_type = info::DescType::Desc::return_type; \
96 #include <sycl/info/kernel_device_specific_traits.def>
97 #undef __SYCL_PARAM_TRAITS_SPEC
100 #define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) \
101 template <> struct PiInfoCode<info::DescType::Desc> { \
102 static constexpr pi_device_info value = \
103 static_cast<pi_device_info>(PiCode); \
106 struct is_##DescType##_info_desc<info::DescType::Desc> : std::true_type { \
107 using return_type = info::DescType::Desc::return_type; \
109 #define __SYCL_PARAM_TRAITS_SPEC_SPECIALIZED(DescType, Desc, ReturnT, PiCode) \
110 __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode)
112 #include <sycl/info/device_traits.def>
114 #undef __SYCL_PARAM_TRAITS_SPEC
115 #undef __SYCL_PARAM_TRAITS_SPEC_SPECIALIZED
117 #define __SYCL_PARAM_TRAITS_SPEC(Namespace, DescType, Desc, ReturnT, PiCode) \
118 template <> struct PiInfoCode<Namespace::info::DescType::Desc> { \
119 static constexpr pi_device_info value = \
120 static_cast<pi_device_info>(PiCode); \
123 struct is_##DescType##_info_desc<Namespace::info::DescType::Desc> \
125 using return_type = Namespace::info::DescType::Desc::return_type; \
127 #include <sycl/info/ext_codeplay_device_traits.def>
128 #include <sycl/info/ext_intel_device_traits.def>
129 #include <sycl/info/ext_oneapi_device_traits.def>
130 #undef __SYCL_PARAM_TRAITS_SPEC
131 #define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) \
133 struct is_backend_info_desc<info::DescType::Desc> : std::true_type { \
134 using return_type = info::DescType::Desc::return_type; \
136 #include <sycl/info/sycl_backend_traits.def>
137 #undef __SYCL_PARAM_TRAITS_SPEC