@@ -33,7 +33,7 @@ <h1>Effect of execution policies on algorithm execution</h1>
33
33
</ cxx-note >
34
34
</ p >
35
35
36
- < cxx-example > < pre > using namespace std::experimental::parallel< ins2 > _v1 </ ins2 > ;
36
+ < cxx-example > < pre > using namespace std::experimental::parallel;
37
37
int a[] = {0,1};
38
38
std::vector<int> v;
39
39
for_each(par, std::begin(a), std::end(a), [&](int i) {
@@ -47,7 +47,7 @@ <h1>Effect of execution policies on algorithm execution</h1>
47
47
</ pre >
48
48
49
49
< cxx-example > < pre >
50
- using namespace std::experimental::parallel< ins2 > _v1 </ ins2 > ;
50
+ using namespace std::experimental::parallel;
51
51
std::atomic< ins2 > <int> </ ins2 > x = 0;
52
52
int a[] = {1,2};
53
53
for_each(par, std::begin(a), std::end(a), [< ins2 > &</ ins2 > ](int n) {
@@ -62,7 +62,7 @@ <h1>Effect of execution policies on algorithm execution</h1>
62
62
</ pre >
63
63
64
64
< cxx-example > < pre >
65
- using namespace std::experimental::parallel< ins2 > _v1 </ ins2 > ;
65
+ using namespace std::experimental::parallel;
66
66
int x< ins2 > =0</ ins2 > ;
67
67
std::mutex m;
68
68
int a[] = {1,2};
@@ -82,7 +82,7 @@ <h1>Effect of execution policies on algorithm execution</h1>
82
82
in unspecified threads, and unsequenced within each thread.
83
83
< ins2 >
84
84
< cxx-note >
85
- This means that multiple function- object invocations may be interleaved on a single thread.
85
+ This means that multiple function object invocations may be interleaved on a single thread.
86
86
</ cxx-note >
87
87
</ ins2 >
88
88
< cxx-note >
@@ -120,8 +120,11 @@ <h1>Effect of execution policies on algorithm execution</h1>
120
120
resources.
121
121
</ cxx-note >
122
122
123
+ <!-- TODO: LWG suggested removing it, I suspect this is a mistake based on the incorrect
124
+ understanding that it is already covered elsewhere -->
125
+ < del2 >
123
126
< p >
124
- < del2 > If they exist, a </ del2 > < ins2 > A</ ins2 > parallel algorithm invoked with an execution policy object of type
127
+ < ins2 > A</ ins2 > parallel algorithm invoked with an execution policy object of type
125
128
< code > parallel_execution_policy</ code > or < code > < del2 > vector_execution_policy</ del2 > < ins2 > parallel_vector_execution_policy</ ins2 > </ code > may apply
126
129
iterator member functions of a stronger category than its specification requires< ins2 > , if such iterators exist</ ins2 > . In this
127
130
case, the application of these member functions are subject to provisions 3. and 4. above,
@@ -134,6 +137,8 @@ <h1>Effect of execution policies on algorithm execution</h1>
134
137
< code > operator[]</ code > . In this case, it is the algorithm caller's responsibility to ensure
135
138
< code > operator[]</ code > is race-free.
136
139
</ cxx-note >
140
+ </ del2 >
141
+ <!-- end of potentially-incorrectly removed section -->
137
142
138
143
< p >
139
144
Algorithms invoked with an execution policy object of type < code > execution_policy</ code >
@@ -163,10 +168,13 @@ <h1><code>ExecutionPolicy</code> algorithm overloads</h1>
163
168
< ins2 >
164
169
The Parallel Algorithms Library provides overloads for each of the algorithms named in
165
170
Table 1, corresponding to the algorithms with the same name in the C++ Standard Algorithms Library.
166
- For each algorithm in < cxx-ref to ="tab.parallel.algorithms "> </ cxx-ref > , there shall be overloads with an additional
167
- template type parameter named < code > ExecutionPolicy</ code > , which is the first template parameter.
168
- In addition, each such overload shall have the new function parameter as the
169
- first function parameter of type < code > ExecutionPolicy&&</ code > .
171
+
172
+ For each algorithm in < cxx-ref to ="tab.parallel.algorithms "> </ cxx-ref > , if there are overloads for
173
+ corresponding algorithms with the same name
174
+ in the C++ Standard Algorithms Library,
175
+ the overloads shall have an additional template type parameter named
176
+ < code > ExecutionPolicy&&</ code > , which shall be the first template parameter.
177
+
170
178
</ ins2 >
171
179
172
180
</ p >
@@ -180,7 +188,7 @@ <h1><code>ExecutionPolicy</code> algorithm overloads</h1>
180
188
Parallel algorithms
181
189
< del > have the requirement < code > is_execution_policy<ExecutionPolicy>::value</ code > is < code > true</ code > </ del >
182
190
< ins > shall not participate in overload resolution unless
183
- < code > is_execution_policy<ExecutionPolicy>::value</ code > is < code > true</ code > </ ins > .
191
+ < code > is_execution_policy<decay_t< ExecutionPolicy> >::value</ code > is < code > true</ code > </ ins > .
184
192
</ p >
185
193
186
194
< del2 > < p > The algorithms listed in < cxx-ref to ="tab.parallel.algorithms "> </ cxx-ref > shall have < code > ExecutionPolicy</ code > overloads.</ p > </ del2 >
@@ -302,6 +310,10 @@ <h1><code>ExecutionPolicy</code> algorithm overloads</h1>
302
310
< td > </ td >
303
311
</ tr >
304
312
</ table >
313
+
314
+ < cxx-note >
315
+ Not all algorithms in the Standard Library have counterparts in < cxx-ref to ="tab.parallel.algorithms "> </ cxx-ref > .
316
+ </ cxx-note >
305
317
</ cxx-section >
306
318
</ cxx-section >
307
319
@@ -340,12 +352,10 @@ <h1>Definitions</h1>
340
352
</ p >
341
353
</ cxx-section >
342
354
343
- < cxx-section id ="parallel.alg.added ">
344
- < h1 > Novel algorithms</ h1 >
345
-
346
- This subclause describes novel algorithms introduced by this Technical Specification.
355
+ < cxx-section id ="parallel.alg.ops ">
356
+ < h1 > Non-Numeric Parallel Algorithms</ h1 >
347
357
348
- < cxx-section id ="parallel.alg.added.algorithms.synop ">
358
+ < cxx-section id ="parallel.alg.ops.synopsis ">
349
359
< h1 > Header < code > <experimental/algorithm></ code > synopsis</ h1 >
350
360
351
361
< pre >
@@ -368,7 +378,7 @@ <h1>Header <code><experimental/algorithm></code> synopsis</h1>
368
378
</ pre >
369
379
</ cxx-section >
370
380
371
- < cxx-section id ="parallel.alg.added. foreach ">
381
+ < cxx-section id ="parallel.alg.foreach ">
372
382
< h1 > For each</ h1 >
373
383
374
384
< cxx-function >
@@ -475,14 +485,18 @@ <h1>For each</h1>
475
485
476
486
< cxx-notes >
477
487
Unlike its sequential form, the parallel overload of < code > for_each_n</ code > requires
478
- < code > Function</ code > to meet the requirements of < code > CopyConstructible</ code > , but not
479
- < code > MoveConstructible</ code > .
488
+ < code > Function</ code > to meet the requirements of < code > CopyConstructible</ code > < del2 > , but not
489
+ < code > MoveConstructible</ code > </ del2 > .
480
490
</ cxx-notes >
481
491
</ cxx-function >
482
492
</ ins >
483
493
</ cxx-section >
494
+ </ cxx-section >
495
+
496
+ < cxx-section id ="parallel.alg.numeric ">
497
+ < h1 > Numeric Parallel Algorithms</ h1 >
484
498
485
- < cxx-section id ="parallel.alg.added. numeric.synop ">
499
+ < cxx-section id ="parallel.alg.numeric.synopsis ">
486
500
< h1 > Header < code > <experimental/numeric></ code > < ins2 > synopsis</ ins2 > </ h1 >
487
501
488
502
< pre >
@@ -539,7 +553,7 @@ <h1>Header <code><experimental/numeric></code><ins2> synopsis</ins2></h1>
539
553
</ pre >
540
554
</ cxx-section >
541
555
542
- < cxx-section id ="parallel.alg.added. reduce ">
556
+ < cxx-section id ="parallel.alg.reduce ">
543
557
< h1 > Reduce</ h1 >
544
558
545
559
< cxx-function >
@@ -627,7 +641,7 @@ <h1>Reduce</h1>
627
641
</ cxx-function >
628
642
</ cxx-section >
629
643
630
- < cxx-section id ="parallel.alg.added. exclusive.scan ">
644
+ < cxx-section id ="parallel.alg.exclusive.scan ">
631
645
< h1 > Exclusive scan</ h1 >
632
646
633
647
< cxx-function >
@@ -701,7 +715,7 @@ <h1>Exclusive scan</h1>
701
715
</ cxx-function >
702
716
</ cxx-section >
703
717
704
- < cxx-section id ="parallel.alg.added. inclusive.scan ">
718
+ < cxx-section id ="parallel.alg.inclusive.scan ">
705
719
< h1 > Inclusive scan</ h1 >
706
720
707
721
< cxx-function >
0 commit comments