diff --git a/sycl/include/sycl/group_algorithm.hpp b/sycl/include/sycl/group_algorithm.hpp index d22e3196e980..6f7f14feb6e3 100644 --- a/sycl/include/sycl/group_algorithm.hpp +++ b/sycl/include/sycl/group_algorithm.hpp @@ -116,14 +116,19 @@ template struct is_native_op { // ---- is_plus template using is_plus = std::integral_constant< - bool, std::is_same_v> || - std::is_same_v>>; + bool, + std::is_same_v>> || + std::is_same_v>> || + std::is_same_v>>; // ---- is_multiplies template using is_multiplies = std::integral_constant< - bool, std::is_same_v> || - std::is_same_v>>; + bool, + std::is_same_v>> || + std::is_same_v>> || + std::is_same_v>>; // ---- is_complex // Use SFINAE so that the "true" branch could be implemented in @@ -134,9 +139,9 @@ struct is_complex : public std::false_type {}; // ---- is_arithmetic_or_complex template -using is_arithmetic_or_complex = std::integral_constant< - bool, sycl::detail::is_complex>::value || - sycl::detail::is_arithmetic::value>; +using is_arithmetic_or_complex = + std::integral_constant::value || + sycl::detail::is_arithmetic::value>; template struct is_vector_arithmetic_or_complex diff --git a/sycl/include/sycl/stl_wrappers/complex b/sycl/include/sycl/stl_wrappers/complex index 6ed159eca7c5..281dac2aabde 100644 --- a/sycl/include/sycl/stl_wrappers/complex +++ b/sycl/include/sycl/stl_wrappers/complex @@ -93,9 +93,9 @@ struct isComplex> || // NOTE: std::complex not yet supported by group algorithms. template -struct is_complex> || - std::is_same_v> || - std::is_same_v>>> +struct is_complex, std::complex> || + std::is_same_v, std::complex> || + std::is_same_v, std::complex>>> : public std::true_type {}; #ifdef __SYCL_DEVICE_ONLY__ diff --git a/sycl/test-e2e/Complex/sycl_complex_include_order.cpp b/sycl/test-e2e/Complex/sycl_complex_include_order.cpp index 69e6b0685c39..245d222c6520 100644 --- a/sycl/test-e2e/Complex/sycl_complex_include_order.cpp +++ b/sycl/test-e2e/Complex/sycl_complex_include_order.cpp @@ -31,6 +31,11 @@ int main() { queue q; auto test = []() { static_assert(sycl::detail::is_complex>::value); + static_assert(sycl::detail::is_complex>::value); + static_assert( + sycl::detail::is_complex>::value); + static_assert( + sycl::detail::is_complex>::value); static_assert(sycl::detail::isComplex>::value); #ifdef __SYCL_DEVICE_ONLY__ static_assert(