Skip to content

Commit 4dd99e6

Browse files
committed
Introduce feature test macro.
Promote incorrectly orgnized subsection 1.3.1 to 1.4.
1 parent 257cf30 commit 4dd99e6

File tree

4 files changed

+161
-91
lines changed

4 files changed

+161
-91
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

1010
# Parallelism TS Editor's Report, Lenexa meeting
1111

12-
D4505 is the latest Parallelism TS Working Draft. It contains editorial changes to the Parallelism TS to apply the following revisions:
12+
D4505 is the latest Parallelism TS Working Draft. It contains editorial and technical changes to the Parallelism TS to apply the following revisions:
1313

1414
* N4274 - Relaxing Packing Rules for Exceptions Thrown by Parallel Algorithms - Proposed Wording (Revision 1)
15-
* D???? - Feature Test Macros for the Parallelism TS
15+
* Feature test macro for the Parallelism TS
1616

1717
D4505 updates the previous draft, N4407, published in the pre-Lenexa mailing.
1818

@@ -22,9 +22,9 @@ N4507 is document N4505 reformatted as a TS document. It updates N4409, which wa
2222

2323
* Applied N4274, which relaxes the exception packaging rules for exceptions thrown by parallel algorithms. Additionally, changed instances of "terminates with (exception)" phrasing to "exits via (exception)", as directed by the Library Working Group.
2424

25-
* Applied D????, which introduces feature test macros for the functionality of the Parallelism TS.
25+
* Introduced the feature test macro `__cpp_lib_experimental_parallel_algorithm` for the functionality of the Parallelism TS as directed by SG1.
2626

2727
## Editorial Changes
2828

29-
None.
29+
* Promoted subsection 1.3.1, which was incorrectly grouped under section 1.3, to section 1.4.
3030

general.html

Lines changed: 68 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -70,59 +70,89 @@ <h1>Namespaces and headers</h1>
7070
<pre>
7171
<code> #include &lt;meow&gt;</code>
7272
</pre>
73+
</cxx-section>
7374

74-
<cxx-section id="parallel.general.defns">
75-
<h1>Terms and definitions</h1>
75+
<cxx-section id="parallel.general.defns">
76+
<h1>Terms and definitions</h1>
77+
78+
<p>For the purposes of this document, the terms and definitions given in the C++ Standard and the following apply.</p>
79+
80+
<p>A <dfn>parallel algorithm</dfn> is a function template described by this Technical Specification declared in namespace <code>std::experimental::parallel::v1</code> with a formal template parameter named <code>ExecutionPolicy</code>.</p>
7681

77-
<p>For the purposes of this document, the terms and definitions given in the C++ Standard and the following apply.</p>
82+
<p>
83+
Parallel algorithms access objects indirectly accessible via their arguments by invoking the following functions:
7884

79-
<p>A <dfn>parallel algorithm</dfn> is a function template described by this Technical Specification declared in namespace <code>std::experimental::parallel::v1</code> with a formal template parameter named <code>ExecutionPolicy</code>.</p>
85+
<ul>
86+
<li>
87+
All operations of the categories of the iterators that the algorithm is instantiated with.
88+
</li>
8089

81-
<p>
82-
Parallel algorithms access objects indirectly accessible via their arguments by invoking the following functions:
90+
<li>
91+
Functions on those sequence elements that are required by its specification.
92+
</li>
93+
94+
<li>
95+
User-provided function objects to be applied during the execution of the algorithm, if required by the specification.
96+
</li>
97+
98+
<ins><li>
99+
Operations on those function objects required by the specification.
100+
101+
<cxx-note>
102+
See clause 25.1 of <em>C++ Standard Algorithms Library</em>.
103+
</cxx-note>
104+
</li></ins>
105+
</ul>
106+
107+
These functions are herein called <em>element access functions</em>.
108+
109+
<cxx-example>
110+
The <code>sort</code> function may invoke the following element access functions:
83111

84112
<ul>
85113
<li>
86-
All operations of the categories of the iterators that the algorithm is instantiated with.
114+
Methods of the random-access iterator of the actual template argument, as per 24.2.7, as implied by the name of the
115+
template parameters <code>RandomAccessIterator</code>.
87116
</li>
88117

89118
<li>
90-
Functions on those sequence elements that are required by its specification.
119+
The <code>swap</code> function on the elements of the sequence (as per 25.4.1.1 [sort]/2).
91120
</li>
92121

93122
<li>
94-
User-provided function objects to be applied during the execution of the algorithm, if required by the specification.
123+
The user-provided <code>Compare</code> function object.
95124
</li>
125+
</ul>
126+
</cxx-example>
127+
</cxx-section>
96128

97-
<ins><li>
98-
Operations on those function objects required by the specification.
129+
<cxx-section id="parallel.general.features">
130+
<ins>
131+
<h1>Feature-testing recommendations</h1>
132+
<p>An implementation that provides support for this Technical Specification shall define the feature test macro(s) in Table 1.</p>
99133

100-
<cxx-note>
101-
See clause 25.1 of <em>C++ Standard Algorithms Library</em>.
102-
</cxx-note>
103-
</li></ins>
104-
</ul>
105-
106-
These functions are herein called <em>element access functions</em>.
107-
108-
<cxx-example>
109-
The <code>sort</code> function may invoke the following element access functions:
110-
111-
<ul>
112-
<li>
113-
Methods of the random-access iterator of the actual template argument, as per 24.2.7, as implied by the name of the
114-
template parameters <code>RandomAccessIterator</code>.
115-
</li>
116-
117-
<li>
118-
The <code>swap</code> function on the elements of the sequence (as per 25.4.1.1 [sort]/2).
119-
</li>
120-
121-
<li>
122-
The user-provided <code>Compare</code> function object.
123-
</li>
124-
</ul>
125-
</cxx-example>
126-
</cxx-section>
134+
<table is="cxx-table" class="column-rules">
135+
<caption>Feature Test Macro(s)</caption>
136+
137+
<thead>
138+
<tr>
139+
<th>Name</th>
140+
<th>Value</th>
141+
<th>Header</th>
142+
</tr>
143+
<tr>
144+
<td><code>__cpp_lib_experimental_parallel_algorithm</code></td>
145+
<td>201505</td>
146+
<td>
147+
<code>&lt;experimental/algorithm&gt;</code><br>
148+
<code>&lt;experimental/exception_list&gt;</code><br>
149+
<code>&lt;experimental/execution_policy&gt;</code><br>
150+
<code>&lt;experimental/numeric&gt;</code>
151+
</td>
152+
</tr>
153+
</thead>
154+
</table>
155+
</ins>
156+
</cxx-section>
127157
</cxx-clause>
128158

parallelism-ts.html

Lines changed: 89 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -761,13 +761,13 @@ <h1>Contents</h1>
761761

762762
<li><span class="marker">1.3</span><a href="#parallel.general.namespaces">Namespaces and headers</a>
763763

764-
<ol>
764+
</li>
765765

766-
<li><span class="marker">1.3.1</span><a href="#parallel.general.defns">Terms and definitions</a>
766+
<li><span class="marker">1.4</span><a href="#parallel.general.defns">Terms and definitions</a>
767767

768768
</li>
769769

770-
</ol>
770+
<li><span class="marker">1.5</span><a href="#parallel.general.features">Feature-testing recommendations</a>
771771

772772
</li>
773773

@@ -1034,80 +1034,120 @@ <h1>Contents</h1>
10341034

10351035
<pre><code> #include &lt;meow&gt;</code>
10361036
</pre>
1037+
1038+
</section>
1039+
</cxx-section>
10371040

1038-
<cxx-section id="parallel.general.defns">
1041+
<cxx-section id="parallel.general.defns">
10391042

10401043

10411044
<section>
1042-
<header><span class="section-number">1.3.1</span> <h1 data-bookmark-label="1.3.1 Terms and definitions">Terms and definitions</h1> <span style="float:right"><a href="#parallel.general.defns">[parallel.general.defns]</a></span></header>
1043-
1045+
<header><span class="section-number">1.4</span> <h1 data-bookmark-label="1.4 Terms and definitions">Terms and definitions</h1> <span style="float:right"><a href="#parallel.general.defns">[parallel.general.defns]</a></span></header>
10441046

1047+
10451048

1046-
<p para_num="1" id="parallel.general.defns.1">For the purposes of this document, the terms and definitions given in the C++ Standard and the following apply.</p>
1049+
<p para_num="1" id="parallel.general.defns.1">For the purposes of this document, the terms and definitions given in the C++ Standard and the following apply.</p>
10471050

1048-
<p para_num="2" id="parallel.general.defns.2">A <dfn>parallel algorithm</dfn> is a function template described by this Technical Specification declared in namespace <code>std::experimental::parallel::v1</code> with a formal template parameter named <code>ExecutionPolicy</code>.</p>
1051+
<p para_num="2" id="parallel.general.defns.2">A <dfn>parallel algorithm</dfn> is a function template described by this Technical Specification declared in namespace <code>std::experimental::parallel::v1</code> with a formal template parameter named <code>ExecutionPolicy</code>.</p>
10491052

1050-
<p para_num="3" id="parallel.general.defns.3">
1051-
Parallel algorithms access objects indirectly accessible via their arguments by invoking the following functions:
1053+
<p para_num="3" id="parallel.general.defns.3">
1054+
Parallel algorithms access objects indirectly accessible via their arguments by invoking the following functions:
10521055

1053-
</p><ul>
1054-
<li>
1055-
All operations of the categories of the iterators that the algorithm is instantiated with.
1056-
</li>
1056+
</p><ul>
1057+
<li>
1058+
All operations of the categories of the iterators that the algorithm is instantiated with.
1059+
</li>
10571060

1058-
<li>
1059-
Functions on those sequence elements that are required by its specification.
1060-
</li>
1061+
<li>
1062+
Functions on those sequence elements that are required by its specification.
1063+
</li>
10611064

1062-
<li>
1063-
User-provided function objects to be applied during the
1064-
execution of the algorithm, if required by the specification.
1065-
</li>
1065+
<li>
1066+
User-provided function objects to be applied during the execution of the algorithm, if required by the specification.
1067+
</li>
10661068

1067-
<ins><li>
1068-
Operations on those function objects required by the specification.
1069+
<ins><li>
1070+
Operations on those function objects required by the specification.
10691071

1070-
<cxx-note><span class="nowrap">[ <em>Note:</em></span>
1072+
<cxx-note><span class="nowrap">[ <em>Note:</em></span>
10711073

1072-
See clause 25.1 of <em>C++ Standard Algorithms Library</em>.
1073-
1074+
See clause 25.1 of <em>C++ Standard Algorithms Library</em>.
1075+
10741076
<span class="nowrap"><em>end note</em> ]</span>
10751077
</cxx-note>
1076-
</li></ins>
1077-
</ul>
1078+
</li></ins>
1079+
</ul>
10781080

1079-
These functions are herein called <em>element access functions</em>.
1081+
These functions are herein called <em>element access functions</em>.
10801082

1081-
<cxx-example>
1083+
<cxx-example>
10821084

10831085
<span class="nowrap">[ <em>Example:</em></span>
10841086

1085-
The <code>sort</code> function may invoke the following element access functions:
1087+
The <code>sort</code> function may invoke the following element access functions:
10861088

1087-
<ul>
1088-
<li>
1089-
Methods of the random-access iterator of the actual
1090-
template argument, as per 24.2.7, as implied by the name of the
1091-
template parameters <code>RandomAccessIterator</code>.
1092-
</li>
1089+
<ul>
1090+
<li>
1091+
Methods of the random-access iterator of the actual template argument, as per 24.2.7, as implied by the name of the
1092+
template parameters <code>RandomAccessIterator</code>.
1093+
</li>
10931094

1094-
<li>
1095-
The <code>swap</code> function on the elements of the sequence (as per 25.4.1.1 [sort]/2).
1096-
</li>
1095+
<li>
1096+
The <code>swap</code> function on the elements of the sequence (as per 25.4.1.1 [sort]/2).
1097+
</li>
10971098

1098-
<li>
1099-
The user-provided <code>Compare</code> function object.
1100-
</li>
1101-
</ul>
1102-
1099+
<li>
1100+
The user-provided <code>Compare</code> function object.
1101+
</li>
1102+
</ul>
1103+
11031104
<span class="nowrap"><em>end example</em> ]</span>
11041105
</cxx-example>
1105-
1106+
11061107
</section>
11071108
</cxx-section>
11081109

1110+
<cxx-section id="parallel.general.features">
1111+
1112+
1113+
<section>
1114+
<header><span class="section-number">1.5</span> <span style="float:right"><a href="#parallel.general.features">[parallel.general.features]</a></span></header>
1115+
1116+
<ins>
1117+
<h1>Feature-testing recommendations</h1>
1118+
<p>An implementation that provides support for this Technical Specification shall define the feature test macro(s) in table 1.</p>
1119+
1120+
<table is="cxx-table" class="column-rules">
1121+
1122+
1123+
<caption>Table 1 — <wbr><span>Feature Test Macro(s)</span></caption>
1124+
1125+
1126+
1127+
<thead>
1128+
<tr>
1129+
<th>Name</th>
1130+
<th>Value</th>
1131+
<th>Header</th>
1132+
</tr>
1133+
<tr>
1134+
<td><code>__cpp_lib_experimental_parallel_algorithm</code></td>
1135+
<td>201505</td>
1136+
<td>
1137+
<code>&lt;experimental/algorithm&gt;</code><br>
1138+
<code>&lt;experimental/exception_list&gt;</code><br>
1139+
<code>&lt;experimental/execution_policy&gt;</code><br>
1140+
<code>&lt;experimental/numeric&gt;</code>
1141+
</td>
1142+
</tr>
1143+
</thead>
1144+
1145+
</table>
1146+
</ins>
1147+
11091148
</section>
11101149
</cxx-section>
1150+
11111151
</section>
11121152
</cxx-clause>
11131153

@@ -1911,7 +1951,7 @@ <h1>Contents</h1>
19111951
The Parallel Algorithms Library provides overloads for each of the algorithms named in
19121952
Table 1, corresponding to the algorithms with the same name in the C++ Standard Algorithms Library.
19131953

1914-
For each algorithm in <cxx-ref to="tab.parallel.algorithms"><a title="tab.parallel.algorithms" href="#tab.parallel.algorithms">Table 1</a></cxx-ref>, if there are overloads for
1954+
For each algorithm in <cxx-ref to="tab.parallel.algorithms"><a title="tab.parallel.algorithms" href="#tab.parallel.algorithms">Table 2</a></cxx-ref>, if there are overloads for
19151955
corresponding algorithms with the same name
19161956
in the C++ Standard Algorithms Library,
19171957
the overloads shall have an additional template type parameter named
@@ -1934,7 +1974,7 @@ <h1>Contents</h1>
19341974
<table role="presentation" is="cxx-table" id="tab.parallel.algorithms" class="list">
19351975

19361976

1937-
<caption>Table 1<wbr><span>Table of parallel algorithms</span></caption>
1977+
<caption>Table 2<wbr><span>Table of parallel algorithms</span></caption>
19381978

19391979

19401980
<tbody><tr>
@@ -2062,7 +2102,7 @@ <h1>Contents</h1>
20622102

20632103
<cxx-note><span class="nowrap">[ <em>Note:</em></span>
20642104

2065-
Not all algorithms in the Standard Library have counterparts in <cxx-ref to="tab.parallel.algorithms"><a title="tab.parallel.algorithms" href="#tab.parallel.algorithms">Table 1</a></cxx-ref>.
2105+
Not all algorithms in the Standard Library have counterparts in <cxx-ref to="tab.parallel.algorithms"><a title="tab.parallel.algorithms" href="#tab.parallel.algorithms">Table 2</a></cxx-ref>.
20662106

20672107
<span class="nowrap"><em>end note</em> ]</span>
20682108
</cxx-note>

parallelism-ts.pdf

1.11 KB
Binary file not shown.

0 commit comments

Comments
 (0)