summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikeDvorskiy <40659946+MikeDvorskiy@users.noreply.github.com>2021-02-10 20:14:07 +0300
committerMikeDvorskiy <40659946+MikeDvorskiy@users.noreply.github.com>2021-02-15 16:31:08 +0300
commite71b181eed2f5c82aecaf89f44e9f096d18540f5 (patch)
tree7b5989c58648786671d26f85a65532e51551723f
parent06aa98447bd85855b01e545ad9261bcb819a7fe6 (diff)
downloadllvm-e71b181eed2f5c82aecaf89f44e9f096d18540f5.tar.gz
[pstl] + a hot fix for an identity value for __pattern_minmax_element
-rw-r--r--include/oneapi/dpl/pstl/algorithm_impl.h2
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