@@ -33,13 +33,22 @@ _LIBCPP_BEGIN_NAMESPACE_STD
33
33
34
34
template <class _Iterator1 , class _DifferenceType , class _Iterator2 , class _Function >
35
35
_LIBCPP_HIDE_FROM_ABI _Iterator2
36
- __simd_walk (_Iterator1 __first1, _DifferenceType __n, _Iterator2 __first2, _Function __f) noexcept {
36
+ __simd_transform (_Iterator1 __first1, _DifferenceType __n, _Iterator2 __first2, _Function __f) noexcept {
37
37
_PSTL_PRAGMA_SIMD
38
38
for (_DifferenceType __i = 0 ; __i < __n; ++__i)
39
39
__f (__first1[__i], __first2[__i]);
40
40
return __first2 + __n;
41
41
}
42
42
43
+ template <class _Iterator1 , class _DifferenceType , class _Iterator2 , class _Iterator3 , class _Function >
44
+ _LIBCPP_HIDE_FROM_ABI _Iterator3 __simd_transform (
45
+ _Iterator1 __first1, _DifferenceType __n, _Iterator2 __first2, _Iterator3 __first3, _Function __f) noexcept {
46
+ _PSTL_PRAGMA_SIMD
47
+ for (_DifferenceType __i = 0 ; __i < __n; ++__i)
48
+ __f (__first1[__i], __first2[__i], __first3[__i]);
49
+ return __first3 + __n;
50
+ }
51
+
43
52
template <class _Backend , class _RawExecutionPolicy >
44
53
struct __cpu_parallel_transform {
45
54
template <class _Policy , class _ForwardIterator , class _ForwardOutIterator , class _UnaryOperation >
@@ -70,7 +79,7 @@ struct __cpu_parallel_transform {
70
79
} else if constexpr (__is_unsequenced_execution_policy_v<_RawExecutionPolicy> &&
71
80
__has_random_access_iterator_category_or_concept<_ForwardIterator>::value &&
72
81
__has_random_access_iterator_category_or_concept<_ForwardOutIterator>::value) {
73
- return std::__simd_walk (
82
+ return std::__simd_transform (
74
83
__first,
75
84
__last - __first,
76
85
__result,
@@ -83,15 +92,6 @@ struct __cpu_parallel_transform {
83
92
}
84
93
};
85
94
86
- template <class _Iterator1 , class _DifferenceType , class _Iterator2 , class _Iterator3 , class _Function >
87
- _LIBCPP_HIDE_FROM_ABI _Iterator3 __simd_walk (
88
- _Iterator1 __first1, _DifferenceType __n, _Iterator2 __first2, _Iterator3 __first3, _Function __f) noexcept {
89
- _PSTL_PRAGMA_SIMD
90
- for (_DifferenceType __i = 0 ; __i < __n; ++__i)
91
- __f (__first1[__i], __first2[__i], __first3[__i]);
92
- return __first3 + __n;
93
- }
94
-
95
95
template <class _Backend , class _RawExecutionPolicy >
96
96
struct __cpu_parallel_transform_binary {
97
97
template <class _Policy ,
@@ -132,7 +132,7 @@ struct __cpu_parallel_transform_binary {
132
132
__has_random_access_iterator_category_or_concept<_ForwardIterator1>::value &&
133
133
__has_random_access_iterator_category_or_concept<_ForwardIterator2>::value &&
134
134
__has_random_access_iterator_category_or_concept<_ForwardOutIterator>::value) {
135
- return std::__simd_walk (
135
+ return std::__simd_transform (
136
136
__first1,
137
137
__last1 - __first1,
138
138
__first2,
0 commit comments