From 927a7360f9ca5ba1e69ad8928b3c53044c1e3bd9 Mon Sep 17 00:00:00 2001 From: Jared Hoberock Date: Thu, 18 Feb 2016 17:42:28 -0600 Subject: [PATCH 01/10] New title page for Version 2 --- front_matter.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/front_matter.html b/front_matter.html index 9e1e977..18a6686 100644 --- a/front_matter.html +++ b/front_matter.html @@ -1,14 +1,14 @@ -N4505 +DXXXX 19570 - - N4407 + + N4505 Jared Hoberock
NVIDIA Corporation
jhoberock@nvidia.com
-

Technical Specification for C++ Extensions for Parallelism

+

Working Draft, Technical Specification for C++ Extensions for Parallelism Version 2

From 487c83cfb23e67bf4ca76e8d8e6845e279cbd1ae Mon Sep 17 00:00:00 2001 From: Jared Hoberock Date: Thu, 18 Feb 2016 17:55:21 -0600 Subject: [PATCH 02/10] Flatten outstanding diffs and replace namespace v1 with v2 --- algorithms.html | 4 ++-- exceptions.html | 23 ++++++++++------------- execution_policies.html | 2 +- general.html | 12 +++++------- 4 files changed, 18 insertions(+), 23 deletions(-) diff --git a/algorithms.html b/algorithms.html index 0a62818..e53a466 100644 --- a/algorithms.html +++ b/algorithms.html @@ -365,7 +365,7 @@

Header <experimental/algorithm> synopsis

namespace std { namespace experimental { namespace parallel { -inline namespace v1 { +inline namespace v2v1 { template<class ExecutionPolicy, class InputIterator, class Function> void for_each(ExecutionPolicy&& exec, @@ -499,7 +499,7 @@

Header <experimental/numeric> synopsis

namespace std { namespace experimental { namespace parallel { -inline namespace v1 { +inline namespace v2v1 { template<class InputIterator> typename iterator_traits<InputIterator>::value_type reduce(InputIterator first, InputIterator last); diff --git a/exceptions.html b/exceptions.html index 4c07716..caac5de 100644 --- a/exceptions.html +++ b/exceptions.html @@ -9,7 +9,7 @@

Exception reporting behavior

During the execution of a standard parallel algorithm, if the invocation of an element access function - exits viaterminates with an uncaught exception, the behavior of the program is determined by the type of + exits via an uncaught exception, the behavior of the program is determined by the type of execution policy used to invoke the algorithm:

These functions are herein called element access functions. @@ -127,7 +127,6 @@

Terms and definitions

-

Feature-testing recommendations

An implementation that provides support for this Technical Specification shall define the feature test macro(s) in Table 1.

@@ -152,7 +151,6 @@

Feature-testing recommendations

-
From fb902ecfb372bd98991ca3bd3e94dd83108cf124 Mon Sep 17 00:00:00 2001 From: Jared Hoberock Date: Mon, 22 Feb 2016 16:41:33 -0600 Subject: [PATCH 03/10] Apply P0155R0. --- README.md | 23 +- front_matter.html | 6 +- general.html | 7 + main.html | 1 + parallelism-ts.html | 621 ++++++++++++++++++++++++++++++++++++++++---- parallelism-ts.pdf | Bin 212423 -> 0 bytes task_block.html | 300 +++++++++++++++++++++ 7 files changed, 894 insertions(+), 64 deletions(-) delete mode 100644 parallelism-ts.pdf create mode 100644 task_block.html diff --git a/README.md b/README.md index 7ce7462..75b075e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ - Document Number: N4506 - Date: 2015-05-05 + Document Number: N4579 + Date: 2015-02-22 Revises: Project: Programming Language C++ Project Number: TS 19570 @@ -7,24 +7,15 @@ NVIDIA Corporation jhoberock@nvidia.com -# Parallelism TS Editor's Report, post-Lenexa mailing +# Parallelism TS Editor's Report, pre-Jacksonville mailing -N4505 is the latest Parallelism TS Working Draft. It contains editorial and technical changes to the Parallelism TS to apply the following revisions: +N4578 is the proposed working draft of Parallelism TS Version 2. It contains technical changes to the Parallelism TS to apply the following revision: - * N4274 - Relaxing Packing Rules for Exceptions Thrown by Parallel Algorithms - Proposed Wording (Revision 1) - * Feature test macro for the Parallelism TS + * P0155R0 - Task Block R5 -N4505 updates the previous draft, N4407, published in the pre-Lenexa mailing. - -N4507 is document N4505 reformatted as a TS document. It updates N4409, which was published in the pre-Lenexa mailing. +N4578 updates the previous draft, N4505, published in the post-Lenexa mailing. ## Technical Changes -* 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. - -* Introduced the feature test macro `__cpp_lib_experimental_parallel_algorithm` for the functionality of the Parallelism TS as directed by SG1. - -## Editorial Changes - -* Promoted subsection 1.3.1, which was incorrectly grouped under section 1.3, to section 1.4. +* Applied P0155R0, which introduces support for fork-join task parallelism via task blocks. diff --git a/front_matter.html b/front_matter.html index 18a6686..56a2ffe 100644 --- a/front_matter.html +++ b/front_matter.html @@ -1,14 +1,14 @@ -DXXXX +N4578 19570 - + N4505 Jared Hoberock
NVIDIA Corporation
jhoberock@nvidia.com
-

Working Draft, Technical Specification for C++ Extensions for Parallelism Version 2

+

Technical Specification for C++ Extensions for Parallelism Version 2

diff --git a/general.html b/general.html index 6d1e462..9c1d9d0 100644 --- a/general.html +++ b/general.html @@ -149,6 +149,13 @@

Feature-testing recommendations

<experimental/numeric> + + __cpp_lib_experimental_parallel_task_block + 201510 + + <experimental/task_block>
+ + diff --git a/main.html b/main.html index c447c4e..24a72e5 100644 --- a/main.html +++ b/main.html @@ -12,6 +12,7 @@ + diff --git a/parallelism-ts.html b/parallelism-ts.html index 3097044..8857fdf 100644 --- a/parallelism-ts.html +++ b/parallelism-ts.html @@ -1,6 +1,7 @@ - -Technical Specification for C++ Extensions for Parallelism, Working Draft +Technical Specification for C++ Extensions for Parallelism Version 2, Working Draft @@ -962,13 +963,13 @@
- + - + - + -
Document Number:N4505
Document Number:N4578
Date:
Date:
Revises:N4407
Revises:N4505
Editor: @@ -977,8 +978,8 @@ jhoberock@nvidia.com
-

Working Draft, Technical Specification for C++ Extensions for Parallelism

+ +

Working Draft, Technical Specification for C++ Extensions for Parallelism Version 2

Note: this is an early draft. It’s known to be incomplet and incorrekt, and it has lots of bad formatting.

@@ -1175,6 +1176,54 @@

Contents

+ + +
  • 5Task Block + +
      + +
    1. 5.1Header <experimental/task_block> synopsis + +
    2. + +
    3. 5.2Class task_cancelled_exception + +
        + +
      1. 5.2.1task_cancelled_exception member function what + +
      2. + +
      + +
    4. + +
    5. 5.3Class task_block + +
        + +
      1. 5.3.1task_block member function template run + +
      2. + +
      3. 5.3.2task_block member function wait + +
      4. + +
      + +
    6. + +
    7. 5.4Function template define_task_block + +
    8. + +
    9. 5.5Exception Handling + +
    10. + +
    +
  • @@ -1264,7 +1313,7 @@

    Contents

    experimental and not part of the C++ Standard Library, they should not be declared directly within namespace std. Unless otherwise specified, all components described in this Technical Specification are declared in namespace - std::experimental::parallel::v1.

    + std::experimental::parallel::v2v1.

    [ Note: @@ -1275,7 +1324,7 @@

    Contents

    Unless otherwise specified, references to such entities described in this Technical Specification are assumed to be qualified with - std::experimental::parallel::v1, and references to entities described in the C++ + std::experimental::parallel::v2v1, and references to entities described in the C++ Standard Library are assumed to be qualified with std::.

    Extensions that are expected to eventually be added to an existing header @@ -1298,7 +1347,7 @@

    Contents

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

    -

    A parallel algorithm is a function template described by this Technical Specification declared in namespace std::experimental::parallel::v1 with a formal template parameter named ExecutionPolicy.

    +

    A parallel algorithm is a function template described by this Technical Specification declared in namespace std::experimental::parallel::v2v1 with a formal template parameter named ExecutionPolicy.

    Parallel algorithms access objects indirectly accessible via their arguments by invoking the following functions: @@ -1316,7 +1365,7 @@

    Contents

    User-provided function objects to be applied during the execution of the algorithm, if required by the specification. -
  • +
  • Operations on those function objects required by the specification. [ Note: @@ -1325,7 +1374,7 @@

    Contents

    end note ]
    -
  • + These functions are herein called element access functions. @@ -1361,11 +1410,10 @@

    Contents

    -
    1.5 [parallel.general.features]
    +
    1.5

    Feature-testing recommendations

    [parallel.general.features]
    - -

    Feature-testing recommendations

    -

    An implementation that provides support for this Technical Specification shall define the feature test macro(s) in Table 1.

    + +

    An implementation that provides support for this Technical Specification shall define the feature test macro(s) in Table 1.

    @@ -1390,10 +1438,16 @@

    Feature-testing recommendations

    <experimental/numeric> + + + + +
    __cpp_lib_experimental_parallel_task_block201510 + <experimental/task_block>
    +
    -
    @@ -1472,14 +1526,14 @@

    Feature-testing recommendations

    -
    2.2

    Header <experimental/execution_policy> synopsis

    [parallel.execpol.synopsis]
    +
    2.2

    Header <experimental/execution_policy> synopsis

    [parallel.execpol.synopsis]
    namespace std {
     namespace experimental {
     namespace parallel {
    -inline namespace v1 {
    +inline namespace v2v1 {
       // 2.3, Execution policy type trait
       template<class T> struct is_execution_policy;
       template<class T> constexpr bool is_execution_policy_v = is_execution_policy<T>::value;
    @@ -1514,7 +1568,10 @@ 

    Feature-testing recommendations

    template<class T> struct is_execution_policy { see below };
     
    -

    is_execution_policy can be used to detect parallel execution policies for the purpose of excluding function signatures from otherwise ambiguous overload resolution participation.

    +

    is_execution_policy + can be used to detect parallel execution policies for the purpose of +excluding function signatures from otherwise ambiguous overload +resolution participation.

    is_execution_policy<T> shall be a UnaryTypeTrait with a BaseCharacteristic of true_type if T is the type of a standard or implementation-defined execution policy, otherwise false_type. @@ -1543,7 +1600,10 @@

    Feature-testing recommendations

    class sequential_execution_policy{ unspecified };
     
    -

    The class sequential_execution_policy is an execution policy type used as a unique type to disambiguate parallel algorithm overloading and require that a parallel algorithm's execution may not be parallelized.

    +

    The class sequential_execution_policy + is an execution policy type used as a unique type to disambiguate +parallel algorithm overloading and require that a parallel algorithm's +execution may not be parallelized.

    @@ -1559,7 +1619,10 @@

    Feature-testing recommendations

    class parallel_execution_policy{ unspecified };
     
    -

    The class parallel_execution_policy is an execution policy type used as a unique type to disambiguate parallel algorithm overloading and indicate that a parallel algorithm's execution may be parallelized.

    +

    The class parallel_execution_policy + is an execution policy type used as a unique type to disambiguate +parallel algorithm overloading and indicate that a parallel algorithm's +execution may be parallelized.

    @@ -1575,7 +1638,10 @@

    Feature-testing recommendations

    class parallel_vector_execution_policy{ unspecified };
     
    -

    The class class parallel_vector_execution_policy is an execution policy type used as a unique type to disambiguate parallel algorithm overloading and indicate that a parallel algorithm's execution may be vectorized and parallelized.

    +

    The class class parallel_vector_execution_policy + is an execution policy type used as a unique type to disambiguate +parallel algorithm overloading and indicate that a parallel algorithm's +execution may be vectorized and parallelized.

    @@ -1781,7 +1847,7 @@

    Feature-testing recommendations

    During the execution of a standard parallel algorithm, if the invocation of an element access function - exits viaterminates with an uncaught exception, the behavior of the program is determined by the type of + exits via an uncaught exception, the behavior of the program is determined by the type of execution policy used to invoke the algorithm: