summaryrefslogtreecommitdiff
path: root/pstl
diff options
context:
space:
mode:
authorNikolas Klauser <n_klauser@apple.com>2023-05-03 14:42:21 -0700
committerNikolas Klauser <n_klauser@apple.com>2023-05-04 09:14:56 -0700
commit9c4717af22307ea64e3514c3c384dda0bdfdf12d (patch)
treeea4db0cc484b35d8635191c57d8b9555c0ace71f /pstl
parent35309db7dcefde20180e924df303f65a14d97d68 (diff)
downloadllvm-9c4717af22307ea64e3514c3c384dda0bdfdf12d.tar.gz
[libc++][PSTL][NFC] Fix the naming in the SIMD backend
Reviewed By: ldionne, #libc Spies: sstefan1, jplehr, libcxx-commits, miyuki Differential Revision: https://reviews.llvm.org/D149787
Diffstat (limited to 'pstl')
-rw-r--r--pstl/include/pstl/internal/unseq_backend_simd.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/pstl/include/pstl/internal/unseq_backend_simd.h b/pstl/include/pstl/internal/unseq_backend_simd.h
index af2a143bc58a..9521a420609a 100644
--- a/pstl/include/pstl/internal/unseq_backend_simd.h
+++ b/pstl/include/pstl/internal/unseq_backend_simd.h
@@ -532,17 +532,17 @@ __simd_scan(_InputIterator __first, _Size __n, _OutputIterator __result, _UnaryO
template <typename _Tp, typename _BinaryOp>
struct _Combiner
{
- _Tp __value;
+ _Tp __value_;
_BinaryOp* __bin_op; // Here is a pointer to function because of default ctor
- _Combiner() : __value{}, __bin_op(nullptr) {}
- _Combiner(const _Tp& value, const _BinaryOp* bin_op) : __value(value), __bin_op(const_cast<_BinaryOp*>(bin_op)) {}
- _Combiner(const _Combiner& __obj) : __value{}, __bin_op(__obj.__bin_op) {}
+ _Combiner() : __value_{}, __bin_op(nullptr) {}
+ _Combiner(const _Tp& value, const _BinaryOp* bin_op) : __value_(value), __bin_op(const_cast<_BinaryOp*>(bin_op)) {}
+ _Combiner(const _Combiner& __obj) : __value_{}, __bin_op(__obj.__bin_op) {}
void
operator()(const _Combiner& __obj)
{
- __value = (*__bin_op)(__value, __obj.__value);
+ __value_ = (*__bin_op)(__value_, __obj.__value);
}
};
@@ -561,12 +561,12 @@ __simd_scan(_InputIterator __first, _Size __n, _OutputIterator __result, _UnaryO
_PSTL_PRAGMA_SIMD_SCAN(__bin_op : __init_)
for (_Size __i = 0; __i < __n; ++__i)
{
- __result[__i] = __init_.__value;
+ __result[__i] = __init_.__value_;
_PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN(__init_)
_PSTL_PRAGMA_FORCEINLINE
- __init_.__value = __binary_op(__init_.__value, __unary_op(__first[__i]));
+ __init_.__value_ = __binary_op(__init_.__value_, __unary_op(__first[__i]));
}
- return std::make_pair(__result + __n, __init_.__value);
+ return std::make_pair(__result + __n, __init_.__value_);
}
// Inclusive scan for "+" and arithmetic types
@@ -602,11 +602,11 @@ __simd_scan(_InputIterator __first, _Size __n, _OutputIterator __result, _UnaryO
for (_Size __i = 0; __i < __n; ++__i)
{
_PSTL_PRAGMA_FORCEINLINE
- __init_.__value = __binary_op(__init_.__value, __unary_op(__first[__i]));
+ __init_.__value_ = __binary_op(__init_.__value_, __unary_op(__first[__i]));
_PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN(__init_)
- __result[__i] = __init_.__value;
+ __result[__i] = __init_.__value_;
}
- return std::make_pair(__result + __n, __init_.__value);
+ return std::make_pair(__result + __n, __init_.__value_);
}
// [restriction] - std::iterator_traits<_ForwardIterator>::value_type should be DefaultConstructible.