@@ -133,7 +133,10 @@ <h1>Effect of execution policies on algorithm execution</h1>
133
133
134
134
< p >
135
135
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 >
137
140
</ p >
138
141
139
142
< p >
@@ -148,8 +151,10 @@ <h1><code>ExecutionPolicy</code> algorithm overloads</h1>
148
151
< p >
149
152
Parallel algorithms coexist alongside their sequential counterparts as overloads
150
153
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 > .
153
158
</ p >
154
159
155
160
< p >
@@ -158,16 +163,18 @@ <h1><code>ExecutionPolicy</code> algorithm overloads</h1>
158
163
</ p >
159
164
160
165
< 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 > .
163
170
</ p >
164
171
165
172
< p > The algorithms listed in < cxx-ref to ="tab.parallel.algorithms "> </ cxx-ref > shall have < code > ExecutionPolicy</ code > overloads.</ p >
166
173
167
174
< table is ="cxx-table " id ="tab.parallel.algorithms " class ="list ">
168
175
< caption > Table of parallel algorithms</ caption >
169
176
< tr >
170
- < td > adjacent_difference</ td >
177
+ < td > < ins > adjacent_difference</ ins > </ td >
171
178
< td > adjacent_find</ td >
172
179
< td > all_of</ td >
173
180
< td > any_of</ td >
@@ -203,7 +210,7 @@ <h1><code>ExecutionPolicy</code> algorithm overloads</h1>
203
210
< td > inclusive_scan</ td >
204
211
</ tr >
205
212
< tr >
206
- < td > inner_product</ td >
213
+ < td > < ins > inner_product</ ins > </ td >
207
214
< td > inplace_merge</ td >
208
215
< td > is_heap</ td >
209
216
< td > is_heap_until</ td >
@@ -378,9 +385,11 @@ <h1>For each</h1>
378
385
its < code > Function</ code > parameter, since parallelization may not permit efficient state
379
386
accumulation.
380
387
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 >
384
393
</ cxx-notes >
385
394
</ cxx-function >
386
395
@@ -410,47 +419,49 @@ <h1>For each</h1>
410
419
</ cxx-effects >
411
420
412
421
< 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 > .
414
423
</ cxx-returns >
415
424
416
425
< cxx-remarks >
417
426
If < code > f</ code > returns a result, the result is ignored.
418
427
</ cxx-remarks >
419
428
</ cxx-function >
420
429
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 >
454
465
</ cxx-section >
455
466
456
467
< cxx-section id ="parallel.alg.novel.numeric.synop ">
@@ -587,7 +598,7 @@ <h1>Reduce</h1>
587
598
588
599
< cxx-notes >
589
600
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 > .
591
602
</ cxx-notes >
592
603
</ cxx-function >
593
604
</ cxx-section >
0 commit comments