diff options
author | MikeDvorskiy <40659946+MikeDvorskiy@users.noreply.github.com> | 2021-02-10 20:14:07 +0300 |
---|---|---|
committer | MikeDvorskiy <40659946+MikeDvorskiy@users.noreply.github.com> | 2021-02-15 16:31:08 +0300 |
commit | e71b181eed2f5c82aecaf89f44e9f096d18540f5 (patch) | |
tree | 7b5989c58648786671d26f85a65532e51551723f | |
parent | Remove extra class from parallel_backend_sycl.h (#120) (diff) | |
download | llvm-project-e71b181eed2f5c82aecaf89f44e9f096d18540f5.tar.gz llvm-project-e71b181eed2f5c82aecaf89f44e9f096d18540f5.tar.bz2 llvm-project-e71b181eed2f5c82aecaf89f44e9f096d18540f5.zip |
[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 |