-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
We implemented C++17 WG21-P0040 Extending Memory Management Tools in VS 2017 15.3 before implementing C++17 WG21-P0024 Parallel Algorithms in VS 2017 15.7.
We missed the fact that P0040 added many ExecutionPolicy overloads to <memory>. Additionally, we missed the fact that P0024 directly added ExecutionPolicy overloads of uninitialized_copy, uninitialized_copy_n, uninitialized_fill, and uninitialized_fill_n.
(It was subtle, as P0024 never mentioned <memory>, and mentioned the uninitialized_meow algorithms only in a "table of parallel algorithms" with instructions to "add the signature of a parallel algorithm overload to the corresponding synopsis in Clause 20, Clause 25, or Clause 26" where (at the time, and currently) Clause 20 was the "General utilities library" where <memory> is specified.)
As of WG21-N4849 patched by LWG-3303 "Bad constexpr marker for destroy/destroy_n", WG21-P1963 "Fixing US-313", and LWG-3552 "Parallel specialized memory algorithms should require forward iterators", the list of ExecutionPolicy overloads in <memory> that we're missing is:
template<class ExecutionPolicy, class NoThrowForwardIterator>
void uninitialized_default_construct(ExecutionPolicy&& exec,
NoThrowForwardIterator first, NoThrowForwardIterator last);
template<class ExecutionPolicy, class NoThrowForwardIterator, class Size>
NoThrowForwardIterator uninitialized_default_construct_n(ExecutionPolicy&& exec,
NoThrowForwardIterator first, Size n);
template<class ExecutionPolicy, class NoThrowForwardIterator>
void uninitialized_value_construct(ExecutionPolicy&& exec,
NoThrowForwardIterator first, NoThrowForwardIterator last);
template<class ExecutionPolicy, class NoThrowForwardIterator, class Size>
NoThrowForwardIterator uninitialized_value_construct_n(ExecutionPolicy&& exec,
NoThrowForwardIterator first, Size n);
template<class ExecutionPolicy, class ForwardIterator, class NoThrowForwardIterator>
NoThrowForwardIterator uninitialized_copy(ExecutionPolicy&& exec,
ForwardIterator first, ForwardIterator last, NoThrowForwardIterator result);
template<class ExecutionPolicy, class ForwardIterator, class Size, class NoThrowForwardIterator>
NoThrowForwardIterator uninitialized_copy_n(ExecutionPolicy&& exec,
ForwardIterator first, Size n, NoThrowForwardIterator result);
template<class ExecutionPolicy, class ForwardIterator, class NoThrowForwardIterator>
NoThrowForwardIterator uninitialized_move(ExecutionPolicy&& exec,
ForwardIterator first, ForwardIterator last, NoThrowForwardIterator result);
template<class ExecutionPolicy, class ForwardIterator, class Size, class NoThrowForwardIterator>
pair<ForwardIterator, NoThrowForwardIterator> uninitialized_move_n(ExecutionPolicy&& exec,
ForwardIterator first, Size n, NoThrowForwardIterator result);
template<class ExecutionPolicy, class NoThrowForwardIterator, class T>
void uninitialized_fill(ExecutionPolicy&& exec,
NoThrowForwardIterator first, NoThrowForwardIterator last, const T& x);
template<class ExecutionPolicy, class NoThrowForwardIterator, class Size, class T>
ForwardIterator uninitialized_fill_n(ExecutionPolicy&& exec,
NoThrowForwardIterator first, Size n, const T& x);
template<class ExecutionPolicy, class NoThrowForwardIterator>
void destroy(ExecutionPolicy&& exec,
NoThrowForwardIterator first, NoThrowForwardIterator last);
template<class ExecutionPolicy, class NoThrowForwardIterator, class Size>
NoThrowForwardIterator destroy_n(ExecutionPolicy&& exec,
NoThrowForwardIterator first, Size n);The lists here need to be updated, regardless of whether we choose to physically parallelize these algorithms, or merely provide signatures calling serial implementations:
Lines 195 to 197 in 798a31a
| // Parallel Algorithms Notes | |
| // C++ allows an implementation to implement parallel algorithms as calls to the serial algorithms. | |
| // This implementation parallelizes several common algorithm calls, but not all. |