Skip to content

Commit

Permalink
Merge pull request #16 from jaredhoberock/master
Browse files Browse the repository at this point in the history
Fix namespaces to match the convention used by the filesystem TS
  • Loading branch information
jaredhoberock committed Jun 20, 2014
2 parents b140eee + d38eceb commit 4843037
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 34 deletions.
10 changes: 7 additions & 3 deletions algorithms.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ <h1>Effect of execution policies on algorithm execution</h1>
</p>

<cxx-example><pre>
using namespace std::experimental::parallel<ins2>_v1</ins2>;
using namespace std::experimental::parallel;
int x<ins2>=0</ins2>;
std::mutex m;
int a[] = {1,2};
Expand Down Expand Up @@ -365,7 +365,8 @@ <h1>Header <code>&lt;experimental/algorithm&gt;</code> synopsis</h1>
<pre>
namespace std {
namespace experimental {
<ins2>inline</ins2> namespace parallel<ins2>_v1</ins2> {
namespace parallel {
<ins2>inline namespace v1 {</ins2>
template&lt;class ExecutionPolicy,
class InputIterator, class Function&gt;
void for_each(ExecutionPolicy&amp;&amp; exec,
Expand All @@ -374,6 +375,7 @@ <h1>Header <code>&lt;experimental/algorithm&gt;</code> synopsis</h1>
template&lt;class InputIterator, class Size, class Function&gt;
InputIterator for_each_n(InputIterator first, Size n,
Function f);
<ins2>}</ins2>
}
}
}
Expand Down Expand Up @@ -504,7 +506,8 @@ <h1>Header <code>&lt;experimental/numeric&gt;</code><ins2> synopsis</ins2></h1>
<pre>
namespace std {
namespace experimental {
<ins2>inline</ins2> namespace parallel<ins2>_v1</ins2> {
namespace parallel {
<ins2>inline namespace v1 {</ins2>
template&lt;class InputIterator&gt;
typename iterator_traits&lt;InputIterator&gt;::value_type
reduce(InputIterator first, InputIterator last);
Expand Down Expand Up @@ -549,6 +552,7 @@ <h1>Header <code>&lt;experimental/numeric&gt;</code><ins2> synopsis</ins2></h1>
inclusive_scan(InputIterator first, InputIterator last,
OutputIterator result,
<del2>T init, </del2>BinaryOperation binary_op<ins2>, T init</ins2>);
<ins2>}</ins2>
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion exceptions.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ <h1>Header <code>&lt;experimental/exception_list&gt;</code> synopsis</h1>

namespace std {
namespace experimental {
<ins2>inline</ins2> namespace parallel<ins2>_v1</ins2> {
namespace parallel {
<ins2>inline namespace v1 {</ins2>

class exception_list : public exception
{
Expand All @@ -84,6 +85,7 @@ <h1>Header <code>&lt;experimental/exception_list&gt;</code> synopsis</h1>
std::list&lt;exception_ptr&gt; exceptions_; // exposition only
</del2>
};
<ins2>}</ins2>
}
}
}
Expand Down
18 changes: 10 additions & 8 deletions execution_policies.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h1>In general</h1>
<insdel>std::sort(std::begin(vec), std::end(vec));</insdel>
<ins2>std::sort(vec.begin(), vec.end());</ins2>

using namespace std::experimental::parallel<ins2>_v1</ins2>;
using namespace std::experimental::parallel;

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

<cxx-ref insynopsis="" to="parallel.execpol.dynamic"></cxx-ref>
class execution_policy;
<ins2>}</ins2>
}
}
}
Expand All @@ -88,7 +90,7 @@ <h1>Execution policy type trait</h1>
<del2>
namespace std {
namespace experimental {
namespace parallel<ins2>_v1</ins2> { </del2>
namespace parallel { </del2>
template&lt;class T&gt; struct is_execution_policy <ins2> { <em>see below</em> };</ins2>
<del2> : integral_constant&lt;bool, <em>see below</em>&gt; { };</del2>
<del2>
Expand All @@ -114,7 +116,7 @@ <h1>Sequential execution policy</h1>
<del2>
namespace std {
namespace experimental {
namespace parallel<ins2>_v1</ins2> {
namespace parallel {
</del2>
class sequential_execution_policy{ <ins2><i>unspecified</i></ins2> };
<del2>
Expand All @@ -134,7 +136,7 @@ <h1>Parallel execution policy</h1>
<del2>
namespace std {
namespace experimental {
namespace parallel<ins2>_v1</ins2> {
namespace parallel {
</del2>
class parallel_execution_policy{ <ins2><i>unspecified</i></ins2> };
<del2>
Expand All @@ -154,7 +156,7 @@ <h1><ins2>Parallel+</ins2>Vector execution policy</h1>
<del2>
namespace std {
namespace experimental {
namespace parallel<ins2>_v1</ins2> {
namespace parallel {
</del2>
class <del2>vector_execution_policy</del2><ins2>parallel_vector_execution_policy</ins2>{ <ins2><i>unspecified</i></ins2> };
<del2>
Expand All @@ -175,7 +177,7 @@ <h1>Dynamic execution policy</h1>
<del2>
namespace std {
namespace experimental {
namespace parallel<ins2>_v1</ins2> {
namespace parallel {
</del2>
class execution_policy
{
Expand Down Expand Up @@ -300,7 +302,7 @@ <h1>Execution policy objects</h1>
<del2>
namespace std {
namespace experimental {
namespace parallel<ins2>_v1</ins2> {
namespace parallel {
</del2>
<del2>
constexpr sequential_execution_policy seq = sequential_execution_policy();
Expand Down
6 changes: 3 additions & 3 deletions general.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ <h1>Namespaces and headers</h1>
experimental and not part of the C++ Standard Library, they should not be
declared directly within namespace <code>std</code>. Unless otherwise specified, all
components described in this Technical Specification are declared in namespace
<code>std::experimental::parallel<ins2>_v1</ins2></code>.</p>
<code>std::experimental::parallel<ins2>::v1</ins2></code>.</p>

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

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

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

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

<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>
<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>
</cxx-section>
</cxx-clause>

50 changes: 31 additions & 19 deletions parallelism-ts.html
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ <h1>Contents</h1>
experimental and not part of the C++ Standard Library, they should not be
declared directly within namespace <code>std</code>. Unless otherwise specified, all
components described in this Technical Specification are declared in namespace
<code>std::experimental::parallel<ins2>_v1</ins2></code>.</p>
<code>std::experimental::parallel<ins2>::v1</ins2></code>.</p>

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

Expand All @@ -845,7 +845,7 @@ <h1>Contents</h1>

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

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

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

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

</section>
</cxx-section>
Expand Down Expand Up @@ -907,7 +907,7 @@ <h1>Contents</h1>
<insdel>std::sort(std::begin(vec), std::end(vec));</insdel>
<ins2>std::sort(vec.begin(), vec.end());</ins2>

using namespace std::experimental::parallel<ins2>_v1</ins2>;
using namespace std::experimental::parallel;

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

<pre>namespace std {
namespace experimental {
<ins2>inline</ins2> namespace parallel<ins2>_v1</ins2> {
namespace parallel {
<ins2>inline namespace v1 {</ins2>
<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>
template&lt;class T&gt; struct is_execution_policy;
<ins2>template&lt;class T&gt; constexpr bool is_execution_policy_v = is_execution_policy&lt;T&gt;::value;</ins2>
Expand All @@ -977,6 +978,7 @@ <h1>Contents</h1>

<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>
class execution_policy;
<ins2>}</ins2>
}
}
}
Expand All @@ -995,7 +997,7 @@ <h1>Contents</h1>
<pre><del2>
namespace std {
namespace experimental {
namespace parallel<ins2>_v1</ins2> { </del2>
namespace parallel { </del2>
template&lt;class T&gt; struct is_execution_policy <ins2> { <em>see below</em> };</ins2>
<del2> : integral_constant&lt;bool, <em>see below</em>&gt; { };</del2>
<del2>
Expand Down Expand Up @@ -1030,7 +1032,7 @@ <h1>Contents</h1>
<pre><del2>
namespace std {
namespace experimental {
namespace parallel<ins2>_v1</ins2> {
namespace parallel {
</del2>
class sequential_execution_policy{ <ins2><i>unspecified</i></ins2> };
<del2>
Expand Down Expand Up @@ -1059,7 +1061,7 @@ <h1>Contents</h1>
<pre><del2>
namespace std {
namespace experimental {
namespace parallel<ins2>_v1</ins2> {
namespace parallel {
</del2>
class parallel_execution_policy{ <ins2><i>unspecified</i></ins2> };
<del2>
Expand Down Expand Up @@ -1088,7 +1090,7 @@ <h1>Contents</h1>
<pre><del2>
namespace std {
namespace experimental {
namespace parallel<ins2>_v1</ins2> {
namespace parallel {
</del2>
class <del2>vector_execution_policy</del2><ins2>parallel_vector_execution_policy</ins2>{ <ins2><i>unspecified</i></ins2> };
<del2>
Expand Down Expand Up @@ -1118,7 +1120,7 @@ <h1>Contents</h1>
<pre><del2>
namespace std {
namespace experimental {
namespace parallel<ins2>_v1</ins2> {
namespace parallel {
</del2>
class execution_policy
{
Expand Down Expand Up @@ -1329,7 +1331,7 @@ <h1>Contents</h1>
<pre><del2>
namespace std {
namespace experimental {
namespace parallel<ins2>_v1</ins2> {
namespace parallel {
</del2>
<del2>
constexpr sequential_execution_policy seq = sequential_execution_policy();
Expand Down Expand Up @@ -1443,7 +1445,8 @@ <h1>Contents</h1>

<pre>namespace std {
namespace experimental {
<ins2>inline</ins2> namespace parallel<ins2>_v1</ins2> {
namespace parallel {
<ins2>inline namespace v1 {</ins2>

class exception_list : public exception
{
Expand All @@ -1469,6 +1472,7 @@ <h1>Contents</h1>
std::list&lt;exception_ptr&gt; exceptions_; // exposition only
</del2>
};
<ins2>}</ins2>
}
}
}
Expand Down Expand Up @@ -1709,7 +1713,7 @@ <h1>Contents</h1>
<cxx-example>

<span class="nowrap">[ <em>Example:</em></span>
<pre>using namespace std::experimental::parallel<ins2>_v1</ins2>;
<pre>using namespace std::experimental::parallel;
int x<ins2>=0</ins2>;
std::mutex m;
int a[] = {1,2};
Expand Down Expand Up @@ -1743,8 +1747,10 @@ <h1>Contents</h1>
<span class="nowrap"><em>end note</em> ]</span>
</cxx-note>

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

<p para_num="5" id="parallel.alg.general.exec.5">
Algorithms invoked with an execution policy object of type <code>execution_policy</code>
Expand Down Expand Up @@ -1806,7 +1811,10 @@ <h1>Contents</h1>
corresponding algorithms with the same name
in the C++ Standard Algorithms Library,
the overloads shall have an additional template type parameter named
<code>ExecutionPolicy&amp;&amp;</code>, which shall be the first template parameter.
<code>ExecutionPolicy</code>, which shall be the first template parameter.

In addition, each such overload shall have the new function parameter as the
first function parameter of type <code>ExecutionPolicy&amp;&amp;</code>.

</ins2>

Expand Down Expand Up @@ -2022,7 +2030,8 @@ <h1>Contents</h1>

<pre>namespace std {
namespace experimental {
<ins2>inline</ins2> namespace parallel<ins2>_v1</ins2> {
namespace parallel {
<ins2>inline namespace v1 {</ins2>
template&lt;class ExecutionPolicy,
class InputIterator, class Function&gt;
void for_each(ExecutionPolicy&amp;&amp; exec,
Expand All @@ -2031,6 +2040,7 @@ <h1>Contents</h1>
template&lt;class InputIterator, class Size, class Function&gt;
InputIterator for_each_n(InputIterator first, Size n,
Function f);
<ins2>}</ins2>
}
}
}
Expand Down Expand Up @@ -2253,7 +2263,8 @@ <h1>Contents</h1>

<pre>namespace std {
namespace experimental {
<ins2>inline</ins2> namespace parallel<ins2>_v1</ins2> {
namespace parallel {
<ins2>inline namespace v1 {</ins2>
template&lt;class InputIterator&gt;
typename iterator_traits&lt;InputIterator&gt;::value_type
reduce(InputIterator first, InputIterator last);
Expand Down Expand Up @@ -2298,6 +2309,7 @@ <h1>Contents</h1>
inclusive_scan(InputIterator first, InputIterator last,
OutputIterator result,
<del2>T init, </del2>BinaryOperation binary_op<ins2>, T init</ins2>);
<ins2>}</ins2>
}
}
}
Expand Down
Binary file modified parallelism-ts.pdf
Binary file not shown.

0 comments on commit 4843037

Please sign in to comment.