Details
- Reviewers
ldionne - Group Reviewers
Restricted Project - Commits
- rGb97859b67416: [libc++][PSTL] Move the already implemented functions to the new dispatching…
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/include/__algorithm/pstl_any_all_none_of.h | ||
---|---|---|
42–44 | I think you can just use std::find_if(__policy, __first, __last, __pred) here. | |
libcxx/include/__algorithm/pstl_backend.h | ||
45 | Also all_of and none_of? | |
libcxx/include/__algorithm/pstl_backends/cpu_backend.h | ||
19–22 | You should add cancel_execution here. | |
26 | We should include any_of. | |
libcxx/include/__algorithm/pstl_backends/cpu_backends/fill.h | ||
39 | Missing __cpu_backend_tag | |
libcxx/include/__algorithm/pstl_backends/cpu_backends/find_if.h | ||
10 | _LIBCPP___ALGORITHM_PSTL_BACKENDS_FIND_IF_H => _LIBCPP___ALGORITHM_PSTL_BACKENDS_CPU_BACKENDS_FIND_IF_H | |
libcxx/include/__algorithm/pstl_fill.h | ||
13 | You also need __algorithm/fill.h right? | |
libcxx/include/__algorithm/pstl_find.h | ||
20 | I don't think you need that. |
Nice! LGTM once CI is green.
libcxx/include/__algorithm/pstl_backends/cpu_backend.h | ||
---|---|---|
20 | ||
libcxx/include/__algorithm/pstl_backends/cpu_backends/fill.h | ||
39 | We should have a test for the CPU backend that lists all the functions it expects to provide, and make sure that they can indeed be called. Otherwise, refactorings can produce stuff like: template <class _ExecutionPolicy, class _ForwardIterator, class _Tp, class = enable_if_t<...> > template <class _ExecutionPolicy, class _ForwardIterator, class _Tp, enable_if_t<..., int> = 0> template <class _ExecutionPolicy, class _ForwardIterator, class _Tp, enable_if_t<...> > which are never valid overloads. This is actually quite tricky and we've been bitten by this in the past. This can be done in a separate patch, but I think it's a requirement of this approach or else we risk introducing performance regressions. |
I think you can just use std::find_if(__policy, __first, __last, __pred) here.