@@ -133,7 +133,10 @@ <h1>Effect of execution policies on algorithm execution</h1>
133133
134134 < p >
135135 Algorithms invoked with an execution policy object of type < code > execution_policy</ code >
136- execute internally as if invoked with the contained execution policy object.
136+ execute internally as if invoked with < del > instances of type < code > sequential_execution_policy</ code > ,
137+ < code > parallel_execution_policy</ code > , or an implementation-defined execution policy type depending
138+ on the dynamic value of the < code > execution_policy</ code > object.</ del >
139+ < ins > the contained execution policy object.</ ins >
137140 </ p >
138141
139142 < p >
@@ -148,8 +151,10 @@ <h1><code>ExecutionPolicy</code> algorithm overloads</h1>
148151 < p >
149152 Parallel algorithms coexist alongside their sequential counterparts as overloads
150153 distinguished by a formal template parameter named < code > ExecutionPolicy</ code > . This
151- is the first template parameter and corresponds to the parallel algorithm's first function
152- parameter, whose type is < code > ExecutionPolicy&&</ code > .
154+ < del > template parameter corresponds to the parallel algorithm's first function parameter, whose
155+ type is < code > ExecutionPolicy</ code > </ del >
156+ < ins > is the first template parameter and corresponds to the parallel algorithm's first function
157+ parameter, whose type is < code > ExecutionPolicy&&</ code > </ ins > .
153158 </ p >
154159
155160 < p >
@@ -158,16 +163,18 @@ <h1><code>ExecutionPolicy</code> algorithm overloads</h1>
158163 </ p >
159164
160165 < p >
161- Parallel algorithms shall not participate in overload resolution unless
162- < code > is_execution_policy<ExecutionPolicy>::value</ code > is < code > true</ code > .
166+ Parallel algorithms
167+ < del > have the requirement < code > is_execution_policy<ExecutionPolicy>::value</ code > is < code > true</ code > </ del >
168+ < ins > shall not participate in overload resolution unless
169+ < code > is_execution_policy<ExecutionPolicy>::value</ code > is < code > true</ code > </ ins > .
163170 </ p >
164171
165172 < p > The algorithms listed in < cxx-ref to ="tab.parallel.algorithms "> </ cxx-ref > shall have < code > ExecutionPolicy</ code > overloads.</ p >
166173
167174 < table is ="cxx-table " id ="tab.parallel.algorithms " class ="list ">
168175 < caption > Table of parallel algorithms</ caption >
169176 < tr >
170- < td > adjacent_difference</ td >
177+ < td > < ins > adjacent_difference</ ins > </ td >
171178 < td > adjacent_find</ td >
172179 < td > all_of</ td >
173180 < td > any_of</ td >
@@ -203,7 +210,7 @@ <h1><code>ExecutionPolicy</code> algorithm overloads</h1>
203210 < td > inclusive_scan</ td >
204211 </ tr >
205212 < tr >
206- < td > inner_product</ td >
213+ < td > < ins > inner_product</ ins > </ td >
207214 < td > inplace_merge</ td >
208215 < td > is_heap</ td >
209216 < td > is_heap_until</ td >
@@ -378,9 +385,11 @@ <h1>For each</h1>
378385 its < code > Function</ code > parameter, since parallelization may not permit efficient state
379386 accumulation.
380387
381- Unlike its sequential form, the parallel overload of < code > for_each</ code > requires
382- < code > Function</ code > to meet the requirements of < code > CopyConstructible</ code > , but not
383- < code > MoveConstructible</ code > .
388+ < ins >
389+ Unlike its sequential form, the parallel overload of < code > for_each</ code > requires
390+ < code > Function</ code > to meet the requirements of < code > CopyConstructible</ code > , but not
391+ < code > MoveConstructible</ code > .
392+ </ ins >
384393 </ cxx-notes >
385394 </ cxx-function >
386395
@@ -410,47 +419,49 @@ <h1>For each</h1>
410419 </ cxx-effects >
411420
412421 < cxx-returns >
413- < code > first + n</ code > for non-negative values of < code > n</ code > and < code > first</ code > for negative values.
422+ < code > first + n</ code > < ins > for non-negative values of < code > n</ code > and < code > first</ code > for negative values</ ins > .
414423 </ cxx-returns >
415424
416425 < cxx-remarks >
417426 If < code > f</ code > returns a result, the result is ignored.
418427 </ cxx-remarks >
419428 </ cxx-function >
420429
421- < cxx-function >
422- < cxx-signature >
423- template<class ExecutionPolicy,
424- class InputIterator, class Size, class Function>
425- InputIterator for_each_n(ExecutionPolicy && exec,
426- InputIterator first, Size n,
427- Function f);
428- </ cxx-signature >
429-
430- < cxx-effects >
431- Applies < code > f</ code > to the result of dereferencing every iterator in the range
432- < code > [first,first + n)</ code > , starting from < code > first</ code > and proceeding to < code > first + n - 1</ code > .
433-
434- < cxx-note >
435- If the type of < code > first</ code > satisfies the requirements of a mutable iterator,
436- < code > f</ code > may apply nonconstant functions through the dereferenced iterator.
437- </ cxx-note >
438- </ cxx-effects >
439-
440- < cxx-returns >
441- < code > first + n</ code > for non-negative values of < code > n</ code > and < code > first</ code > for negative values.
442- </ cxx-returns >
443-
444- < cxx-remarks >
445- If < code > f</ code > returns a result, the result is ignored.
446- </ cxx-remarks >
447-
448- < cxx-notes >
449- Unlike its sequential form, the parallel overload of < code > for_each_n</ code > requires
450- < code > Function</ code > to meet the requirements of < code > CopyConstructible</ code > , but not
451- < code > MoveConstructible</ code > .
452- </ cxx-notes >
453- </ cxx-function >
430+ < ins >
431+ < cxx-function >
432+ < cxx-signature >
433+ template<class ExecutionPolicy,
434+ class InputIterator, class Size, class Function>
435+ InputIterator for_each_n(ExecutionPolicy && exec,
436+ InputIterator first, Size n,
437+ Function f);
438+ </ cxx-signature >
439+
440+ < cxx-effects >
441+ Applies < code > f</ code > to the result of dereferencing every iterator in the range
442+ < code > [first,first + n)</ code > , starting from < code > first</ code > and proceeding to < code > first + n - 1</ code > .
443+
444+ < cxx-note >
445+ If the type of < code > first</ code > satisfies the requirements of a mutable iterator,
446+ < code > f</ code > may apply nonconstant functions through the dereferenced iterator.
447+ </ cxx-note >
448+ </ cxx-effects >
449+
450+ < cxx-returns >
451+ < code > first + n</ code > < ins > for non-negative values of < code > n</ code > and < code > first</ code > for negative values.
452+ </ cxx-returns >
453+
454+ < cxx-remarks >
455+ If < code > f</ code > returns a result, the result is ignored.
456+ </ cxx-remarks >
457+
458+ < cxx-notes >
459+ Unlike its sequential form, the parallel overload of < code > for_each_n</ code > requires
460+ < code > Function</ code > to meet the requirements of < code > CopyConstructible</ code > , but not
461+ < code > MoveConstructible</ code > .
462+ </ cxx-notes >
463+ </ cxx-function >
464+ </ ins >
454465 </ cxx-section >
455466
456467 < cxx-section id ="parallel.alg.novel.numeric.synop ">
@@ -587,7 +598,7 @@ <h1>Reduce</h1>
587598
588599 < cxx-notes >
589600 The primary difference between < code > reduce</ code > and < code > accumulate</ code > is that the behavior
590- of < code > reduce</ code > may be non-deterministic for non-associative or non-commutative < code > binary_op</ code > .
601+ of < code > reduce</ code > may be non-deterministic for non-associative or non-commutative < del > < code > operator+ </ code > </ del > < ins > < code > binary_op</ code > </ ins > .
591602 </ cxx-notes >
592603 </ cxx-function >
593604 </ cxx-section >
0 commit comments