Skip to content

Commit 4843037

Browse files
committed
Merge pull request #16 from jaredhoberock/master
Fix namespaces to match the convention used by the filesystem TS
2 parents b140eee + d38eceb commit 4843037

File tree

6 files changed

+54
-34
lines changed

6 files changed

+54
-34
lines changed

algorithms.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ <h1>Effect of execution policies on algorithm execution</h1>
9292
</p>
9393

9494
<cxx-example><pre>
95-
using namespace std::experimental::parallel<ins2>_v1</ins2>;
95+
using namespace std::experimental::parallel;
9696
int x<ins2>=0</ins2>;
9797
std::mutex m;
9898
int a[] = {1,2};
@@ -365,7 +365,8 @@ <h1>Header <code>&lt;experimental/algorithm&gt;</code> synopsis</h1>
365365
<pre>
366366
namespace std {
367367
namespace experimental {
368-
<ins2>inline</ins2> namespace parallel<ins2>_v1</ins2> {
368+
namespace parallel {
369+
<ins2>inline namespace v1 {</ins2>
369370
template&lt;class ExecutionPolicy,
370371
class InputIterator, class Function&gt;
371372
void for_each(ExecutionPolicy&amp;&amp; exec,
@@ -374,6 +375,7 @@ <h1>Header <code>&lt;experimental/algorithm&gt;</code> synopsis</h1>
374375
template&lt;class InputIterator, class Size, class Function&gt;
375376
InputIterator for_each_n(InputIterator first, Size n,
376377
Function f);
378+
<ins2>}</ins2>
377379
}
378380
}
379381
}
@@ -504,7 +506,8 @@ <h1>Header <code>&lt;experimental/numeric&gt;</code><ins2> synopsis</ins2></h1>
504506
<pre>
505507
namespace std {
506508
namespace experimental {
507-
<ins2>inline</ins2> namespace parallel<ins2>_v1</ins2> {
509+
namespace parallel {
510+
<ins2>inline namespace v1 {</ins2>
508511
template&lt;class InputIterator&gt;
509512
typename iterator_traits&lt;InputIterator&gt;::value_type
510513
reduce(InputIterator first, InputIterator last);
@@ -549,6 +552,7 @@ <h1>Header <code>&lt;experimental/numeric&gt;</code><ins2> synopsis</ins2></h1>
549552
inclusive_scan(InputIterator first, InputIterator last,
550553
OutputIterator result,
551554
<del2>T init, </del2>BinaryOperation binary_op<ins2>, T init</ins2>);
555+
<ins2>}</ins2>
552556
}
553557
}
554558
}

exceptions.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ <h1>Header <code>&lt;experimental/exception_list&gt;</code> synopsis</h1>
5858

5959
namespace std {
6060
namespace experimental {
61-
<ins2>inline</ins2> namespace parallel<ins2>_v1</ins2> {
61+
namespace parallel {
62+
<ins2>inline namespace v1 {</ins2>
6263

6364
class exception_list : public exception
6465
{
@@ -84,6 +85,7 @@ <h1>Header <code>&lt;experimental/exception_list&gt;</code> synopsis</h1>
8485
std::list&lt;exception_ptr&gt; exceptions_; // exposition only
8586
</del2>
8687
};
88+
<ins2>}</ins2>
8789
}
8890
}
8991
}

execution_policies.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h1>In general</h1>
1616
<insdel>std::sort(std::begin(vec), std::end(vec));</insdel>
1717
<ins2>std::sort(vec.begin(), vec.end());</ins2>
1818

19-
using namespace std::experimental::parallel<ins2>_v1</ins2>;
19+
using namespace std::experimental::parallel;
2020

2121
// explicitly sequential sort
2222
<del>sort(seq, v.begin(), v.end());</del>
@@ -60,7 +60,8 @@ <h1>Header <code>&lt;experimental/execution_policy&gt;</code> synopsis</h1>
6060
<pre>
6161
namespace std {
6262
namespace experimental {
63-
<ins2>inline</ins2> namespace parallel<ins2>_v1</ins2> {
63+
namespace parallel {
64+
<ins2>inline namespace v1 {</ins2>
6465
<cxx-ref insynopsis="" to="parallel.execpol.type"></cxx-ref>
6566
template&lt;class T&gt; struct is_execution_policy;
6667
<ins2>template&lt;class T&gt; constexpr bool is_execution_policy_v = is_execution_policy&lt;T&gt;::value;</ins2>
@@ -76,6 +77,7 @@ <h1>Header <code>&lt;experimental/execution_policy&gt;</code> synopsis</h1>
7677

7778
<cxx-ref insynopsis="" to="parallel.execpol.dynamic"></cxx-ref>
7879
class execution_policy;
80+
<ins2>}</ins2>
7981
}
8082
}
8183
}
@@ -88,7 +90,7 @@ <h1>Execution policy type trait</h1>
8890
<del2>
8991
namespace std {
9092
namespace experimental {
91-
namespace parallel<ins2>_v1</ins2> { </del2>
93+
namespace parallel { </del2>
9294
template&lt;class T&gt; struct is_execution_policy <ins2> { <em>see below</em> };</ins2>
9395
<del2> : integral_constant&lt;bool, <em>see below</em>&gt; { };</del2>
9496
<del2>
@@ -114,7 +116,7 @@ <h1>Sequential execution policy</h1>
114116
<del2>
115117
namespace std {
116118
namespace experimental {
117-
namespace parallel<ins2>_v1</ins2> {
119+
namespace parallel {
118120
</del2>
119121
class sequential_execution_policy{ <ins2><i>unspecified</i></ins2> };
120122
<del2>
@@ -134,7 +136,7 @@ <h1>Parallel execution policy</h1>
134136
<del2>
135137
namespace std {
136138
namespace experimental {
137-
namespace parallel<ins2>_v1</ins2> {
139+
namespace parallel {
138140
</del2>
139141
class parallel_execution_policy{ <ins2><i>unspecified</i></ins2> };
140142
<del2>
@@ -154,7 +156,7 @@ <h1><ins2>Parallel+</ins2>Vector execution policy</h1>
154156
<del2>
155157
namespace std {
156158
namespace experimental {
157-
namespace parallel<ins2>_v1</ins2> {
159+
namespace parallel {
158160
</del2>
159161
class <del2>vector_execution_policy</del2><ins2>parallel_vector_execution_policy</ins2>{ <ins2><i>unspecified</i></ins2> };
160162
<del2>
@@ -175,7 +177,7 @@ <h1>Dynamic execution policy</h1>
175177
<del2>
176178
namespace std {
177179
namespace experimental {
178-
namespace parallel<ins2>_v1</ins2> {
180+
namespace parallel {
179181
</del2>
180182
class execution_policy
181183
{
@@ -300,7 +302,7 @@ <h1>Execution policy objects</h1>
300302
<del2>
301303
namespace std {
302304
namespace experimental {
303-
namespace parallel<ins2>_v1</ins2> {
305+
namespace parallel {
304306
</del2>
305307
<del2>
306308
constexpr sequential_execution_policy seq = sequential_execution_policy();

general.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ <h1>Namespaces and headers</h1>
5252
experimental and not part of the C++ Standard Library, they should not be
5353
declared directly within namespace <code>std</code>. Unless otherwise specified, all
5454
components described in this Technical Specification are declared in namespace
55-
<code>std::experimental::parallel<ins2>_v1</ins2></code>.</p>
55+
<code>std::experimental::parallel<ins2>::v1</ins2></code>.</p>
5656

5757
<cxx-note>
5858
Once standardized, the components described by this Technical Specification are expected to be promoted to namespace <code>std</code>.
5959
</cxx-note>
6060

6161
<p>Unless otherwise specified, references to such entities described in this
6262
Technical Specification are assumed to be qualified with
63-
<code>std::experimental::parallel<ins2>_v1</ins2></code>, and references to entities described in the C++
63+
<code>std::experimental::parallel<ins2>::v1</ins2></code>, and references to entities described in the C++
6464
Standard Library are assumed to be qualified with <code>std::</code>.</p>
6565

6666
<p>Extensions that are expected to eventually be added to an existing header
@@ -76,7 +76,7 @@ <h1>Terms and definitions</h1>
7676

7777
<p>For the purposes of this document, the terms and definitions given in the C++ Standard and the following apply.</p>
7878

79-
<p>A <dfn>parallel algorithm</dfn> is a function template described by this Technical Specification declared in namespace <code>std::experimental::parallel<ins2>_v1</ins2></code> with a formal template parameter named <code>ExecutionPolicy</code>.</p>
79+
<p>A <dfn>parallel algorithm</dfn> is a function template described by this Technical Specification declared in namespace <code>std::experimental::parallel<ins2>::v1</ins2></code> with a formal template parameter named <code>ExecutionPolicy</code>.</p>
8080
</cxx-section>
8181
</cxx-clause>
8282

parallelism-ts.html

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ <h1>Contents</h1>
834834
experimental and not part of the C++ Standard Library, they should not be
835835
declared directly within namespace <code>std</code>. Unless otherwise specified, all
836836
components described in this Technical Specification are declared in namespace
837-
<code>std::experimental::parallel<ins2>_v1</ins2></code>.</p>
837+
<code>std::experimental::parallel<ins2>::v1</ins2></code>.</p>
838838

839839
<cxx-note><span class="nowrap">[ <em>Note:</em></span>
840840

@@ -845,7 +845,7 @@ <h1>Contents</h1>
845845

846846
<p para_num="2" id="parallel.general.namespaces.2">Unless otherwise specified, references to such entities described in this
847847
Technical Specification are assumed to be qualified with
848-
<code>std::experimental::parallel<ins2>_v1</ins2></code>, and references to entities described in the C++
848+
<code>std::experimental::parallel<ins2>::v1</ins2></code>, and references to entities described in the C++
849849
Standard Library are assumed to be qualified with <code>std::</code>.</p>
850850

851851
<p para_num="3" id="parallel.general.namespaces.3">Extensions that are expected to eventually be added to an existing header
@@ -865,7 +865,7 @@ <h1>Contents</h1>
865865

866866
<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>
867867

868-
<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<ins2>_v1</ins2></code> with a formal template parameter named <code>ExecutionPolicy</code>.</p>
868+
<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<ins2>::v1</ins2></code> with a formal template parameter named <code>ExecutionPolicy</code>.</p>
869869

870870
</section>
871871
</cxx-section>
@@ -907,7 +907,7 @@ <h1>Contents</h1>
907907
<insdel>std::sort(std::begin(vec), std::end(vec));</insdel>
908908
<ins2>std::sort(vec.begin(), vec.end());</ins2>
909909

910-
using namespace std::experimental::parallel<ins2>_v1</ins2>;
910+
using namespace std::experimental::parallel;
911911

912912
// explicitly sequential sort
913913
<del>sort(seq, v.begin(), v.end());</del>
@@ -961,7 +961,8 @@ <h1>Contents</h1>
961961

962962
<pre>namespace std {
963963
namespace experimental {
964-
<ins2>inline</ins2> namespace parallel<ins2>_v1</ins2> {
964+
namespace parallel {
965+
<ins2>inline namespace v1 {</ins2>
965966
<cxx-ref insynopsis="" to="parallel.execpol.type">// <i><a title="parallel.execpol.type" href="#parallel.execpol.type">2.3</a>, Execution policy type trait</i></cxx-ref>
966967
template&lt;class T&gt; struct is_execution_policy;
967968
<ins2>template&lt;class T&gt; constexpr bool is_execution_policy_v = is_execution_policy&lt;T&gt;::value;</ins2>
@@ -977,6 +978,7 @@ <h1>Contents</h1>
977978

978979
<cxx-ref insynopsis="" to="parallel.execpol.dynamic">// <i><a title="parallel.execpol.dynamic" href="#parallel.execpol.dynamic">2.7</a>, Dynamic execution policy</i></cxx-ref>
979980
class execution_policy;
981+
<ins2>}</ins2>
980982
}
981983
}
982984
}
@@ -995,7 +997,7 @@ <h1>Contents</h1>
995997
<pre><del2>
996998
namespace std {
997999
namespace experimental {
998-
namespace parallel<ins2>_v1</ins2> { </del2>
1000+
namespace parallel { </del2>
9991001
template&lt;class T&gt; struct is_execution_policy <ins2> { <em>see below</em> };</ins2>
10001002
<del2> : integral_constant&lt;bool, <em>see below</em>&gt; { };</del2>
10011003
<del2>
@@ -1030,7 +1032,7 @@ <h1>Contents</h1>
10301032
<pre><del2>
10311033
namespace std {
10321034
namespace experimental {
1033-
namespace parallel<ins2>_v1</ins2> {
1035+
namespace parallel {
10341036
</del2>
10351037
class sequential_execution_policy{ <ins2><i>unspecified</i></ins2> };
10361038
<del2>
@@ -1059,7 +1061,7 @@ <h1>Contents</h1>
10591061
<pre><del2>
10601062
namespace std {
10611063
namespace experimental {
1062-
namespace parallel<ins2>_v1</ins2> {
1064+
namespace parallel {
10631065
</del2>
10641066
class parallel_execution_policy{ <ins2><i>unspecified</i></ins2> };
10651067
<del2>
@@ -1088,7 +1090,7 @@ <h1>Contents</h1>
10881090
<pre><del2>
10891091
namespace std {
10901092
namespace experimental {
1091-
namespace parallel<ins2>_v1</ins2> {
1093+
namespace parallel {
10921094
</del2>
10931095
class <del2>vector_execution_policy</del2><ins2>parallel_vector_execution_policy</ins2>{ <ins2><i>unspecified</i></ins2> };
10941096
<del2>
@@ -1118,7 +1120,7 @@ <h1>Contents</h1>
11181120
<pre><del2>
11191121
namespace std {
11201122
namespace experimental {
1121-
namespace parallel<ins2>_v1</ins2> {
1123+
namespace parallel {
11221124
</del2>
11231125
class execution_policy
11241126
{
@@ -1329,7 +1331,7 @@ <h1>Contents</h1>
13291331
<pre><del2>
13301332
namespace std {
13311333
namespace experimental {
1332-
namespace parallel<ins2>_v1</ins2> {
1334+
namespace parallel {
13331335
</del2>
13341336
<del2>
13351337
constexpr sequential_execution_policy seq = sequential_execution_policy();
@@ -1443,7 +1445,8 @@ <h1>Contents</h1>
14431445

14441446
<pre>namespace std {
14451447
namespace experimental {
1446-
<ins2>inline</ins2> namespace parallel<ins2>_v1</ins2> {
1448+
namespace parallel {
1449+
<ins2>inline namespace v1 {</ins2>
14471450

14481451
class exception_list : public exception
14491452
{
@@ -1469,6 +1472,7 @@ <h1>Contents</h1>
14691472
std::list&lt;exception_ptr&gt; exceptions_; // exposition only
14701473
</del2>
14711474
};
1475+
<ins2>}</ins2>
14721476
}
14731477
}
14741478
}
@@ -1709,7 +1713,7 @@ <h1>Contents</h1>
17091713
<cxx-example>
17101714

17111715
<span class="nowrap">[ <em>Example:</em></span>
1712-
<pre>using namespace std::experimental::parallel<ins2>_v1</ins2>;
1716+
<pre>using namespace std::experimental::parallel;
17131717
int x<ins2>=0</ins2>;
17141718
std::mutex m;
17151719
int a[] = {1,2};
@@ -1743,8 +1747,10 @@ <h1>Contents</h1>
17431747
<span class="nowrap"><em>end note</em> ]</span>
17441748
</cxx-note>
17451749

1746-
<!-- TODO: LWG suggested removing it, I suspect this is a mistake based on the incorrect
1747-
understanding that it is already covered elsewhere -->
1750+
<!-- Update 6/20/14: this is OK: this is covered in N4063:
1751+
"All operations of the categories of the iterators that the algorithm is instantiated with"
1752+
So there is no problem, deletion is OK.
1753+
-->
17481754
<del2>
17491755
<p>
17501756
<ins2>A</ins2> parallel algorithm invoked with an execution policy object of type
@@ -1764,7 +1770,6 @@ <h1>Contents</h1>
17641770
<span class="nowrap"><em>end note</em> ]</span>
17651771
</cxx-note>
17661772
</del2>
1767-
<!-- end of potentially-incorrectly removed section -->
17681773

17691774
<p para_num="5" id="parallel.alg.general.exec.5">
17701775
Algorithms invoked with an execution policy object of type <code>execution_policy</code>
@@ -1806,7 +1811,10 @@ <h1>Contents</h1>
18061811
corresponding algorithms with the same name
18071812
in the C++ Standard Algorithms Library,
18081813
the overloads shall have an additional template type parameter named
1809-
<code>ExecutionPolicy&amp;&amp;</code>, which shall be the first template parameter.
1814+
<code>ExecutionPolicy</code>, which shall be the first template parameter.
1815+
1816+
In addition, each such overload shall have the new function parameter as the
1817+
first function parameter of type <code>ExecutionPolicy&amp;&amp;</code>.
18101818

18111819
</ins2>
18121820

@@ -2022,7 +2030,8 @@ <h1>Contents</h1>
20222030

20232031
<pre>namespace std {
20242032
namespace experimental {
2025-
<ins2>inline</ins2> namespace parallel<ins2>_v1</ins2> {
2033+
namespace parallel {
2034+
<ins2>inline namespace v1 {</ins2>
20262035
template&lt;class ExecutionPolicy,
20272036
class InputIterator, class Function&gt;
20282037
void for_each(ExecutionPolicy&amp;&amp; exec,
@@ -2031,6 +2040,7 @@ <h1>Contents</h1>
20312040
template&lt;class InputIterator, class Size, class Function&gt;
20322041
InputIterator for_each_n(InputIterator first, Size n,
20332042
Function f);
2043+
<ins2>}</ins2>
20342044
}
20352045
}
20362046
}
@@ -2253,7 +2263,8 @@ <h1>Contents</h1>
22532263

22542264
<pre>namespace std {
22552265
namespace experimental {
2256-
<ins2>inline</ins2> namespace parallel<ins2>_v1</ins2> {
2266+
namespace parallel {
2267+
<ins2>inline namespace v1 {</ins2>
22572268
template&lt;class InputIterator&gt;
22582269
typename iterator_traits&lt;InputIterator&gt;::value_type
22592270
reduce(InputIterator first, InputIterator last);
@@ -2298,6 +2309,7 @@ <h1>Contents</h1>
22982309
inclusive_scan(InputIterator first, InputIterator last,
22992310
OutputIterator result,
23002311
<del2>T init, </del2>BinaryOperation binary_op<ins2>, T init</ins2>);
2312+
<ins2>}</ins2>
23012313
}
23022314
}
23032315
}

parallelism-ts.pdf

-374 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)