@@ -56,11 +56,19 @@ __mismatch(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Pred& __pred, _Pro
56
56
57
57
#if _LIBCPP_VECTORIZE_ALGORITHMS
58
58
59
+ template <class _ValueType >
60
+ _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __simd_vector<long long , 2 >
61
+ __reverse_vector (__simd_vector<long long , 2 >& __cmp_res) {
62
+ # if defined(_LIBCPP_BIG_ENDIAN)
63
+ __cmp_res = __builtin_shufflevector (__cmp_res, __cmp_res, 1 , 0 );
64
+ # endif
65
+ return __cmp_res;
66
+ }
67
+
59
68
template <class _ValueType >
60
69
_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __simd_vector<long , 2 >
61
70
__reverse_vector (__simd_vector<long , 2 >& __cmp_res) {
62
71
# if defined(_LIBCPP_BIG_ENDIAN)
63
- static_assert (__native_vector_size<long > == 2 , " The __native_vector_size has to be 2" );
64
72
__cmp_res = __builtin_shufflevector (__cmp_res, __cmp_res, 1 , 0 );
65
73
# endif
66
74
return __cmp_res;
@@ -70,7 +78,6 @@ template <class _ValueType>
70
78
_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __simd_vector<long , 4 >
71
79
__reverse_vector (__simd_vector<long , 4 >& __cmp_res) {
72
80
# if defined(_LIBCPP_BIG_ENDIAN)
73
- static_assert (__native_vector_size<long > == 4 , " The __native_vector_size has to be 4" );
74
81
__cmp_res = __builtin_shufflevector (__cmp_res, __cmp_res, 3 , 2 , 1 , 0 );
75
82
# endif
76
83
return __cmp_res;
@@ -80,7 +87,6 @@ template <class _ValueType>
80
87
_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __simd_vector<int , 8 >
81
88
__reverse_vector (__simd_vector<int , 8 >& __cmp_res) {
82
89
# if defined(_LIBCPP_BIG_ENDIAN)
83
- static_assert (__native_vector_size<int > == 8 , " The __native_vector_size has to be 8" );
84
90
__cmp_res = __builtin_shufflevector (__cmp_res, __cmp_res, 7 , 6 , 5 , 4 , 3 , 2 , 1 , 0 );
85
91
# endif
86
92
return __cmp_res;
@@ -90,7 +96,6 @@ template <class _ValueType>
90
96
_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __simd_vector<int , 4 >
91
97
__reverse_vector (__simd_vector<int , 4 >& __cmp_res) {
92
98
# if defined(_LIBCPP_BIG_ENDIAN)
93
- static_assert (__native_vector_size<int > == 4 , " The __native_vector_size has to be 4" );
94
99
__cmp_res = __builtin_shufflevector (__cmp_res, __cmp_res, 3 , 2 , 1 , 0 );
95
100
# endif
96
101
return __cmp_res;
@@ -100,7 +105,6 @@ template <class _ValueType>
100
105
_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __simd_vector<_ValueType, 8 >
101
106
__reverse_vector (__simd_vector<_ValueType, 8 >& __cmp_res) {
102
107
# if defined(_LIBCPP_BIG_ENDIAN)
103
- static_assert (__native_vector_size<_ValueType> == 8 , " The __native_vector_size has to be 8" );
104
108
__cmp_res = __builtin_shufflevector (__cmp_res, __cmp_res, 7 , 6 , 5 , 4 , 3 , 2 , 1 , 0 );
105
109
# endif
106
110
return __cmp_res;
@@ -110,7 +114,6 @@ template <class _ValueType>
110
114
_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __simd_vector<_ValueType, 16 >
111
115
__reverse_vector (__simd_vector<_ValueType, 16 > __cmp_res) {
112
116
# if defined(_LIBCPP_BIG_ENDIAN)
113
- static_assert (__native_vector_size<_ValueType> == 16 , " The __native_vector_size has to be 16" );
114
117
__cmp_res = __builtin_shufflevector (__cmp_res, __cmp_res, 15 , 14 , 13 , 12 , 11 , 10 , 9 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1 , 0 );
115
118
# endif
116
119
return __cmp_res;
@@ -120,7 +123,6 @@ template <class _ValueType>
120
123
_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 __simd_vector<_ValueType, 32 >
121
124
__reverse_vector (__simd_vector<_ValueType, 32 > __cmp_res) {
122
125
# if defined(_LIBCPP_BIG_ENDIAN)
123
- static_assert (__native_vector_size<_ValueType> == 32 , " The __native_vector_size has to be 32" );
124
126
__cmp_res = __builtin_shufflevector (
125
127
__cmp_res,
126
128
__cmp_res,
0 commit comments