13 #include <type_traits>
23 inline namespace _V1 {
42 #define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) \
43 template <> struct PiInfoCode<info::DescType::Desc> { \
44 static constexpr pi_##DescType##_info value = PiCode; \
47 struct is_##DescType##_info_desc<info::DescType::Desc> : std::true_type { \
48 using return_type = info::DescType::Desc::return_type; \
50 #include <sycl/info/context_traits.def>
51 #include <sycl/info/event_traits.def>
52 #include <sycl/info/kernel_traits.def>
53 #include <sycl/info/platform_traits.def>
54 #include <sycl/info/queue_traits.def>
55 #undef __SYCL_PARAM_TRAITS_SPEC
56 #define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) \
57 template <> struct PiInfoCode<info::DescType::Desc> { \
58 static constexpr pi_profiling_info value = PiCode; \
61 struct is_##DescType##_info_desc<info::DescType::Desc> : std::true_type { \
62 using return_type = info::DescType::Desc::return_type; \
64 #include <sycl/info/event_profiling_traits.def>
65 #undef __SYCL_PARAM_TRAITS_SPEC
81 #define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) \
82 template <> struct PiInfoCode<info::DescType::Desc> { \
84 typename std::conditional<IsSubGroupInfo<info::DescType::Desc>::value, \
85 pi_kernel_sub_group_info, \
86 pi_kernel_group_info>::type value = PiCode; \
89 struct is_##DescType##_info_desc<info::DescType::Desc> : std::true_type { \
90 using return_type = info::DescType::Desc::return_type; \
92 #include <sycl/info/kernel_device_specific_traits.def>
93 #undef __SYCL_PARAM_TRAITS_SPEC
96 #define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) \
97 template <> struct PiInfoCode<info::DescType::Desc> { \
98 static constexpr pi_device_info value = \
99 static_cast<pi_device_info>(PiCode); \
102 struct is_##DescType##_info_desc<info::DescType::Desc> : std::true_type { \
103 using return_type = info::DescType::Desc::return_type; \
105 #define __SYCL_PARAM_TRAITS_SPEC_SPECIALIZED(DescType, Desc, ReturnT, PiCode) \
106 __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode)
108 #include <sycl/info/device_traits.def>
110 #undef __SYCL_PARAM_TRAITS_SPEC
111 #undef __SYCL_PARAM_TRAITS_SPEC_SPECIALIZED
113 #define __SYCL_PARAM_TRAITS_SPEC(Namespace, DescType, Desc, ReturnT, PiCode) \
114 template <> struct PiInfoCode<Namespace::info::DescType::Desc> { \
115 static constexpr pi_device_info value = \
116 static_cast<pi_device_info>(PiCode); \
119 struct is_##DescType##_info_desc<Namespace::info::DescType::Desc> \
121 using return_type = Namespace::info::DescType::Desc::return_type; \
123 #include <sycl/info/ext_codeplay_device_traits.def>
124 #include <sycl/info/ext_intel_device_traits.def>
125 #include <sycl/info/ext_oneapi_device_traits.def>
126 #undef __SYCL_PARAM_TRAITS_SPEC