|
18 | 18 | #include <sycl/detail/defines_elementary.hpp> // for __SYCL2020_DEPRECATED
|
19 | 19 | #include <sycl/detail/export.hpp> // for __SYCL_EXPORT
|
20 | 20 | #include <sycl/detail/owner_less_base.hpp> // for OwnerLessBase
|
21 |
| -#include <sycl/ext/oneapi/bfloat16.hpp> // for bfloat16 |
22 |
| -#include <sycl/group.hpp> // for group |
23 |
| -#include <sycl/h_item.hpp> // for h_item |
24 |
| -#include <sycl/half_type.hpp> // for half, operator-, operator< |
25 |
| -#include <sycl/handler.hpp> // for handler |
26 |
| -#include <sycl/item.hpp> // for item |
27 |
| -#include <sycl/nd_item.hpp> // for nd_item |
28 |
| -#include <sycl/nd_range.hpp> // for nd_range |
29 |
| -#include <sycl/property_list.hpp> // for property_list |
30 |
| -#include <sycl/range.hpp> // for range |
31 |
| -#include <sycl/vector.hpp> // for vec, SwizzleOp |
| 21 | +#include <sycl/detail/type_traits/vec_marray_traits.hpp> |
| 22 | +#include <sycl/ext/oneapi/bfloat16.hpp> // for bfloat16 |
| 23 | +#include <sycl/group.hpp> // for group |
| 24 | +#include <sycl/h_item.hpp> // for h_item |
| 25 | +#include <sycl/half_type.hpp> // for half, operator-, operator< |
| 26 | +#include <sycl/handler.hpp> // for handler |
| 27 | +#include <sycl/item.hpp> // for item |
| 28 | +#include <sycl/nd_item.hpp> // for nd_item |
| 29 | +#include <sycl/nd_range.hpp> // for nd_range |
| 30 | +#include <sycl/property_list.hpp> // for property_list |
| 31 | +#include <sycl/range.hpp> // for range |
32 | 32 |
|
33 | 33 | #include <cstddef> // for size_t, byte
|
34 | 34 | #include <memory> // for hash, shared_ptr
|
@@ -745,23 +745,6 @@ inline void writeHItem(GlobalBufAccessorT &GlobalFlushBuf,
|
745 | 745 | Len += append(Buf + Len, "\n)");
|
746 | 746 | write(GlobalFlushBuf, FlushBufferSize, WIOffset, Buf, Len);
|
747 | 747 | }
|
748 |
| - |
749 |
| -template <typename> struct IsSwizzleOp : std::false_type {}; |
750 |
| - |
751 |
| -template <typename VecT, typename OperationLeftT, typename OperationRightT, |
752 |
| - template <typename> class OperationCurrentT, int... Indexes> |
753 |
| -struct IsSwizzleOp<sycl::detail::SwizzleOp< |
754 |
| - VecT, OperationLeftT, OperationRightT, OperationCurrentT, Indexes...>> |
755 |
| - : std::true_type { |
756 |
| - using T = typename VecT::element_type; |
757 |
| - using Type = typename sycl::vec<T, (sizeof...(Indexes))>; |
758 |
| -}; |
759 |
| - |
760 |
| -template <typename T> |
761 |
| -using EnableIfSwizzleVec = |
762 |
| - typename std::enable_if_t<IsSwizzleOp<T>::value, |
763 |
| - typename IsSwizzleOp<T>::Type>; |
764 |
| - |
765 | 748 | } // namespace detail
|
766 | 749 |
|
767 | 750 | enum class stream_manipulator {
|
@@ -1310,7 +1293,9 @@ inline const stream &operator<<(const stream &Out,
|
1310 | 1293 | return Out;
|
1311 | 1294 | }
|
1312 | 1295 |
|
1313 |
| -template <typename T, typename RT = detail::EnableIfSwizzleVec<T>> |
| 1296 | +template <typename T, |
| 1297 | + typename RT = std::enable_if_t<detail::is_swizzle_v<T>, |
| 1298 | + detail::simplify_if_swizzle_t<T>>> |
1314 | 1299 | inline const stream &operator<<(const stream &Out, const T &RHS) {
|
1315 | 1300 | RT V = RHS;
|
1316 | 1301 | Out << V;
|
|
0 commit comments