Implement the mechanism that simplifies the execution policy/iterator
category dispatching and allows to implement customizations for
the parallel algorithms with adding custom tags
Reviewed By: rodgert, MikeDvorskiy
Differential Revision: https://reviews.llvm.org/D104492
https://reviews.llvm.org/D74123
The fix affects follow algorithms:
remove_if, unique, rotate, inplace_merge, partial_sort_copy, set_union, set_intersection, set_difference, set_symmetric_difference.
For "is_trivial" types there are no problems with "creating objects/clean-up"
For non-trivial types the algo results are also correct, but possible incorrect copying/moving "operator=" calls "by raw memory" within one of mentioned algo or incorrect destructor calls in the end of algo.
- unused parameter warnings
- don't use single-letter template parameter names, like we do in libc++
- sign-comparison warnings
- unused variables in the tests
- unused local typedefs in the tests
- the use of #include_next
- field reordering in the tests
- unused lambda captures
Note that the rationale for why the static_casts to unsigned are OK is
that last - first must always be non-negative, since [first, last) is
a valid range.
llvm-svn: 362148
Summary:
Before this change, the default backend was TBB but one could disable
anything related to TBB by removing the parallel policies. This change
uses the serial backend by default and removes the ability to disable
parallel policies, which is not useful anymore.
Reviewers: rodgert, MikeDvorskiy
Subscribers: mgorny, jkorous, dexonsmith, jdoerfert, libcxx-commits
Differential Revision: https://reviews.llvm.org/D59792
llvm-svn: 359134
Summary:
PSTL should not provide those headers since they belong to the standard
library. Instead, we define a dummy standard library in the tests that
provides those headers.
Reviewers: rodgert, MikeDvorskiy
Subscribers: mgorny, jkorous, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D60535
llvm-svn: 358497