mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-30 09:01:19 +00:00
[pstl] Use std::transform_reduce instead of hand-rolled implementation
llvm-svn: 366233
This commit is contained in:
parent
c26e27d802
commit
3559fcd114
@ -93,11 +93,7 @@ _Tp
|
||||
__brick_transform_reduce(_ForwardIterator __first, _ForwardIterator __last, _Tp __init, _BinaryOperation __binary_op,
|
||||
_UnaryOperation __unary_op, /*is_vector=*/std::false_type) noexcept
|
||||
{
|
||||
for (; __first != __last; ++__first)
|
||||
{
|
||||
__init = __binary_op(__init, __unary_op(*__first));
|
||||
}
|
||||
return __init;
|
||||
return std::transform_reduce(__first, __last, __init, __binary_op, __unary_op);
|
||||
}
|
||||
|
||||
template <class _ForwardIterator, class _Tp, class _UnaryOperation, class _BinaryOperation>
|
||||
|
Loading…
Reference in New Issue
Block a user