diff options
author | MikeDvorskiy <40659946+MikeDvorskiy@users.noreply.github.com> | 2021-02-10 20:14:07 +0300 |
---|---|---|
committer | Mikhail Dvorskiy <mikhail.dvorskiy@intel.com> | 2021-02-24 11:35:32 +0300 |
commit | 4f369fa7913454f83c516d9f5815e94f5aef8a83 (patch) | |
tree | 0d936fdbf9a3bfb076444be83e5d66584264597a | |
parent | a96f840b00630ed832cf9e681ca03e22198229d1 (diff) | |
download | llvm-4f369fa7913454f83c516d9f5815e94f5aef8a83.tar.gz |
[pstl] + a hot fix for an identity value for __pattern_minmax_element
-rw-r--r-- | include/oneapi/dpl/pstl/algorithm_impl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/oneapi/dpl/pstl/algorithm_impl.h b/include/oneapi/dpl/pstl/algorithm_impl.h index 76b77e59991d..24ddc31d57ea 100644 --- a/include/oneapi/dpl/pstl/algorithm_impl.h +++ b/include/oneapi/dpl/pstl/algorithm_impl.h @@ -3786,7 +3786,7 @@ __pattern_minmax_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _F return __par_backend::__parallel_reduce( ::std::forward<_ExecutionPolicy>(__exec), __first, __last, - /*identity*/ ::std::make_pair(__last, __first - 1), + /*identity*/ ::std::make_pair(__last, __last), [=, &__comp](_ForwardIterator __begin, _ForwardIterator __end, _Result __init) -> _Result { const _Result __subresult = __internal::__brick_minmax_element(__begin, __end, __comp, __is_vector); if (__init.first == __last) // = identity |