@@ -58,9 +58,9 @@ constexpr bool is_int32_type = std::is_same_v<std::decay_t<T>, int32_t> ||
5858
5959// Helper constexpr bool to avoid ugly macros where possible
6060#ifdef SYCL_EXT_ONEAPI_BFLOAT16_MATH_FUNCTIONS
61- constexpr bool support_bfloat16_math = true ;
61+ constexpr bool support_bfloat16_math = true ;
6262#else
63- constexpr bool support_bfloat16_math = false ;
63+ constexpr bool support_bfloat16_math = false ;
6464#endif
6565
6666template <typename ValueT>
@@ -2291,23 +2291,24 @@ inline constexpr unsigned extend_vcompare4_add(AT a, BT b, unsigned c,
22912291// ops return bfloat16)
22922292// TODO(syclcompat-lib-reviewers) Move this to bfloat extension
22932293namespace std {
2294- template <>
2295- struct common_type <sycl::ext::oneapi::bfloat16> {
2296- using type = sycl::ext::oneapi::bfloat16;
2297- };
2298-
2299- template <>
2300- struct common_type <sycl::ext::oneapi::bfloat16, sycl::ext::oneapi::bfloat16> {
2301- using type = sycl::ext::oneapi::bfloat16;
2302- };
2303-
2304- template <typename T>
2305- struct common_type <sycl::ext::oneapi::bfloat16, T> {
2306- using type = sycl::ext::oneapi::bfloat16; // std::common_type_t<float, T>; // sycl::ext::oneapi::bfloat16 promotes to float
2307- };
2308-
2309- template <typename T>
2310- struct common_type <T, sycl::ext::oneapi::bfloat16> {
2311- using type = sycl::ext::oneapi::bfloat16; // std::common_type_t<T, float>; // sycl::ext::oneapi::bfloat16 promotes to float
2312- };
2313- }
2294+ template <> struct common_type <sycl::ext::oneapi::bfloat16> {
2295+ using type = sycl::ext::oneapi::bfloat16;
2296+ };
2297+
2298+ template <>
2299+ struct common_type <sycl::ext::oneapi::bfloat16, sycl::ext::oneapi::bfloat16> {
2300+ using type = sycl::ext::oneapi::bfloat16;
2301+ };
2302+
2303+ template <typename T> struct common_type <sycl::ext::oneapi::bfloat16, T> {
2304+ using type = sycl::ext::oneapi::bfloat16; // std::common_type_t<float, T>; //
2305+ // sycl::ext::oneapi::bfloat16
2306+ // promotes to float
2307+ };
2308+
2309+ template <typename T> struct common_type <T, sycl::ext::oneapi::bfloat16> {
2310+ using type = sycl::ext::oneapi::bfloat16; // std::common_type_t<T, float>; //
2311+ // sycl::ext::oneapi::bfloat16
2312+ // promotes to float
2313+ };
2314+ } // namespace std
0 commit comments