ISO/IEC TS 19570:2018
(Main)Programming Languages — Technical Specification for C++ Extensions for Parallelism
Programming Languages — Technical Specification for C++ Extensions for Parallelism
This document describes requirements for implementations of an interface that computer programs written in the C++ programming language can use to invoke algorithms with parallel execution. The algorithms described by this document are realizable across a broad class of computer architectures. There is a possibility of a subset of the functionality described by this document being standardized in a future version of C++, but it is not currently part of any C++ standard. There is a possibility of some of the functionality in this document never being standardized, or of it being standardized in a substantially changed form. The goal of this document is to build widespread existing practice for parallelism in the C++ programming language. It gives advice on extensions to those vendors who wish to provide them.
Langages de programmation — Spécification technique pour les extensions C++ relatives au parallélisme
General Information
Relations
Buy Standard
Standards Content (Sample)
TECHNICAL ISO/IEC TS
SPECIFICATION 19570
Second edition
2018-11
Programming Languages — Technical
Specification for C++ Extensions for
Parallelism
Langages de programmation — Spécification technique pour les
extensions C++ relatives au parallélisme
Reference number
©
ISO/IEC 2018
© ISO/IEC 2018
All rights reserved. Unless otherwise specified, or required in the context of its implementation, no part of this publication may
be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting
on the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address
below or ISO’s member body in the country of the requester.
ISO copyright office
CP 401 • Ch. de Blandonnet 8
CH-1214 Vernier, Geneva
Phone: +41 22 749 01 11
Fax: +41 22 749 09 47
Email: copyright@iso.org
Website: www.iso.org
Published in Switzerland
ii © ISO/IEC 2018 – All rights reserved
Contents
Foreword iv
1 Scope 1
2 Normative references 2
3 Terms and definitions 3
4 General 4
4.1 Namespaces and headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
4.2 Feature-testing recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
5 Parallel exceptions 5
5.1 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . 5
6 Execution policies 6
6.1 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . 6
6.2 Unsequenced execution policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
6.3 Vector execution policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
6.4 Execution policy objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
7 Parallel algorithms 8
7.1 Wavefront Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
7.2 Non-Numeric Parallel Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
8 Task Block 16
8.1 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . 16
8.2 Class task_cancelled_exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
8.3 Class task_block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
8.4 Function template define_task_block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
8.5 Exception Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
9 Data-Parallel Types 20
9.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
9.2 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
9.3 simd ABI tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
9.4 simd type traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
9.5 Where expression class templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
9.6 Class template simd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
9.7 simd non-member operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
9.8 Class template simd_mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
9.9 Non-member operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
c
CONTENTS �ISO/IEC 2018 – All rights reserved iii
Foreword [parallel.foreword]
ISO (the International Organization for Standardization) and IEC (the International Electrotechnical
Commission) form the specialized system for worldwide standardization. National bodies that are members
of ISO or IEC participate in the development of International Standards through technical committees
established by the respective organization to deal with particular fields of technical activity. ISO and IEC
technical committees collaborate in fields of mutual interest. Other international organizations, governmental
and non-governmental, in liaison with ISO and IEC, also take part in the work. In the field of information
technology, ISO and IEC have established a joint technical committee, ISO/IEC JTC 1.
The procedures used to develop this document and those intended for its further maintenance are described
in the ISO/IEC Directives, Part 1. In particular, the different approval criteria needed for the different
types of document should be noted. This document was drafted in accordance with the editorial rules of the
ISO/IEC Directives, Part 2 (see www.iso.org/directives).
Attention is drawn to the possibility that some of the elements of this document may be the subject of patent
rights. ISO and IEC shall not be held responsible for identifying any or all such patent rights. Details of any
patent rights identified during the development of the document will be in the Introduction and/or on the
ISO list of patent declarations received (see www.iso.org/patents).
Any trade name used in this document is information given for the convenience of users and does not
constitute an endorsement.
For an explanation of the voluntary nature of standards, the meaning of ISO specific terms and expressions re-
lated to conformity assessment, as well as information about ISO’s adherence to the World Trade Organization
(WTO) principles in the Technical Barriers to Trade (TBT) see www.iso.org/iso/foreword.html.
This document was prepared by Technical Committee ISO/IEC JTC 1, Information technology, Subcommittee
SC 22, Programming languages, their environments and system software interfaces.
This second edition cancels and replaces the first edition (ISO/IEC 19570:2015) which has been technically
revised.
The main changes compared to the previous edition are as follows:
(8.1)
— Eliminate previously standardized functionality.
(8.2)
— Introduce task block.
(8.3)
— Introduce vector and wavefront policies.
(8.4)
— Introduce a template library for parallel for loops.
(8.5)
— Introduce data-parallel vector types.
Any feedback or questions on this document should be directed to the user’s national standards body. A
complete listing of these bodies can be found at www.iso.org/members.html.
c
Foreword �ISO/IEC 2018 – All rights reserved iv
TECHNICAL SPECIFICATION ISO/IEC TS 19570:2018(E)
Programming Languages — Technical Specification for C++
Extensions for Parallelism
1 Scope [parallel.scope]
This document describes requirements for implementations of an interface that computer programs written
++
in the C programming language can use to invoke algorithms with parallel execution. The algorithms
described by this document are realizable across a broad class of computer architectures.
There is a possibility of a subset of the functionality described by this document being standardized in a
++ ++
future version of C , but it is not currently part of any C standard. There is a possibility of some of
the functionality in this document never being standardized, or of it being standardized in a substantially
changed form.
3 ++
The goal of this document is to build widespread existing practice for parallelism in the C programming
language. It gives advice on extensions to those vendors who wish to provide them.
c
Scope �ISO/IEC 2018 – All rights reserved 1
2 Normative references [parallel.references]
The following documents are referred to in the text in such a way that some or all of their content constitutes
requirements of this document. For dated references, only the edition cited applies. For undated references,
the latest edition of the referenced document (including any amendments) applies.
(1.1)
— ISO/IEC 14882:2017, Programming languages — C++
++ ++
ISO/IEC 14882:2017 is herein called the C Standard. References to clauses within the C Standard are
++
written as “C 17 §20”. The library described in ISO/IEC 14882:2017 clauses 20-33 is herein called the C++
Standard Library. The C++ Standard Library components described in ISO/IEC 14882:2017 clauses 28, 29.8
and 23.10.10 are herein called the C++ Standard Algorithms Library.
3 ++
Unless otherwise specified, the whole of the C++ Standard’s Library introduction (C 17 §20) is included
into this document by reference.
c
Normative references �ISO/IEC 2018 – All rights reserved 2
3 Terms and definitions [parallel.defns]
For the purposes of this document, the terms, definitions, and symbols given in ISO/IEC 14882:2017 apply.
ISO and IEC maintain terminological databases for use in standardization at the following addresses:
(2.1)
— ISO Online browsing platform: available at https://www.iso.org/obp
(2.2)
— IEC Electropedia: available at http://www.electropedia.org
c
Terms and definitions �ISO/IEC 2018 – All rights reserved 3
4 General [parallel.general]
4.1 Namespaces and headers [parallel.general.namespaces]
++
Since the extensions described in this document are 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 document are declared in namespace std::experimental::parallelism_v2.
[Note: Once standardized, the components described by this document are expected to be promoted to
namespace std.—end note]
Each header described in this document shall import the contents of std::experimental::parallelism_v2
into std::experimental as if by
namespace std::experimental {
inline namespace parallelism_v2 {}
}
Unless otherwise specified, references to such entities described in this document are assumed to be qualified
++
with std::experimental::parallelism_v2, 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 are provided inside the
header, which shall include the standard contents of as if by
#include
4.2 Feature-testing recommendations [parallel.general.features]
An implementation that provides support for this document shall define the feature test macro(s) in Table 1.
Table 1 — Feature-test macro(s)
Title Subclause Macro Name Value Header
Task Block 8 __cpp_lib_experimental_- 201711
parallel_task_block
Vector and 6.2 __cpp_lib_experimental_- 201711
Wavefront execution_vector_policy
Policies
Template 7.2.2, __cpp_lib_experimental_- 201711
Library for 7.2.3, parallel_for_loop
Parallel For 7.2.4
Loops
Data-Parallel 9 __cpp_lib_experimental_- 201803
Vector Types parallel_simd
c
§ 4.2 �ISO/IEC 2018 – All rights reserved 4
5 Parallel exceptions [parallel.exceptions]
5.1 Header synopsis [parallel.exceptions.synopsis]
namespace std::experimental {
inline namespace parallelism_v2 {
class exception_list : public exception {
public:
using iterator = unspecified;
size_t size() const noexcept;
iterator begin() const noexcept;
iterator end() const noexcept;
const char* what() const noexcept override;
};
}
}
The class exception_list owns a sequence of exception_ptr objects.
exception_list::iterator is an iterator which meets the forward iterator requirements and has a value
type of exception_ptr.
size_t size() const noexcept;
Returns: The number of exception_ptr objects contained within the exception_list.
Complexity: Constant time.
iterator begin() const noexcept;
Returns: An iterator referring to the first exception_ptr object returned within the exception_list.
iterator end() const noexcept;
Returns: An iterator that is past the end of the owned sequence.
const char* what() const noexcept override;
Returns: An implementation-defined NTBS.
c
§ 5.1 �ISO/IEC 2018 – All rights reserved 5
6 Execution policies [parallel.execpol]
6.1 Header synopsis [parallel.execpol.synopsis]
#include
namespace std::experimental {
inline namespace parallelism_v2 {
namespace execution {
// 6.2, Unsequenced execution policy
class unsequenced_policy;
// 6.3, Vector execution policy
class vector_policy;
// 6.4, Execution policy objects
inline constexpr unsequenced_policy unseq{ unspecified };
inline constexpr vector_policy vec{ unspecified };
}
}
}
6.2 Unsequenced execution policy [parallel.execpol.unseq]
class unsequenced_policy { unspecified };
The class unsequenced_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, e.g., executed on
a single thread using instructions that operate on multiple data items.
The invocations of element access functions in parallel algorithms invoked with an execution policy of type
unsequenced_policy are permitted to execute in an unordered fashion in the calling thread, unsequenced
with respect to one another within the calling thread. [Note: This means that multiple function object
invocations may be interleaved on a single thread.—end note]
3 ++ ++
[Note: This overrides the usual guarantee from the C Standard, C 17 §4.6 that function executions do
not overlap with one another. —end note]
During the execution of a parallel algorithm with the experimental::execution::unsequenced_policy
policy, if the invocation of an element access function exits via an uncaught exception, terminate() will be
called.
6.3 Vector execution policy [parallel.execpol.vec]
class vector_policy { unspecified };
The class vector_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. Additionally,
such vectorization will result in an execution that respects the sequencing constraints of wavefront application
(7.1). [Note: The implementation thus makes stronger guarantees than for unsequenced_policy, for
example.—end note]
The invocations of element access functions in parallel algorithm
...
TECHNICAL ISO/IEC TS
SPECIFICATION 19570
Second edition
2018-11
Programming Languages — Technical
Specification for C++ Extensions for
Parallelism
Langages de programmation — Spécification technique pour les
extensions C++ relatives au parallélisme
Reference number
©
ISO/IEC 2018
© ISO/IEC 2018
All rights reserved. Unless otherwise specified, or required in the context of its implementation, no part of this publication may
be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting
on the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address
below or ISO’s member body in the country of the requester.
ISO copyright office
CP 401 • Ch. de Blandonnet 8
CH-1214 Vernier, Geneva
Phone: +41 22 749 01 11
Fax: +41 22 749 09 47
Email: copyright@iso.org
Website: www.iso.org
Published in Switzerland
ii © ISO/IEC 2018 – All rights reserved
Contents
Foreword iv
1 Scope 1
2 Normative references 2
3 Terms and definitions 3
4 General 4
4.1 Namespaces and headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
4.2 Feature-testing recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
5 Parallel exceptions 5
5.1 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . 5
6 Execution policies 6
6.1 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . 6
6.2 Unsequenced execution policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
6.3 Vector execution policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
6.4 Execution policy objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
7 Parallel algorithms 8
7.1 Wavefront Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
7.2 Non-Numeric Parallel Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
8 Task Block 16
8.1 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . 16
8.2 Class task_cancelled_exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
8.3 Class task_block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
8.4 Function template define_task_block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
8.5 Exception Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
9 Data-Parallel Types 20
9.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
9.2 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
9.3 simd ABI tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
9.4 simd type traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
9.5 Where expression class templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
9.6 Class template simd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
9.7 simd non-member operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
9.8 Class template simd_mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
9.9 Non-member operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
c
CONTENTS �ISO/IEC 2018 – All rights reserved iii
Foreword [parallel.foreword]
ISO (the International Organization for Standardization) and IEC (the International Electrotechnical
Commission) form the specialized system for worldwide standardization. National bodies that are members
of ISO or IEC participate in the development of International Standards through technical committees
established by the respective organization to deal with particular fields of technical activity. ISO and IEC
technical committees collaborate in fields of mutual interest. Other international organizations, governmental
and non-governmental, in liaison with ISO and IEC, also take part in the work. In the field of information
technology, ISO and IEC have established a joint technical committee, ISO/IEC JTC 1.
The procedures used to develop this document and those intended for its further maintenance are described
in the ISO/IEC Directives, Part 1. In particular, the different approval criteria needed for the different
types of document should be noted. This document was drafted in accordance with the editorial rules of the
ISO/IEC Directives, Part 2 (see www.iso.org/directives).
Attention is drawn to the possibility that some of the elements of this document may be the subject of patent
rights. ISO and IEC shall not be held responsible for identifying any or all such patent rights. Details of any
patent rights identified during the development of the document will be in the Introduction and/or on the
ISO list of patent declarations received (see www.iso.org/patents).
Any trade name used in this document is information given for the convenience of users and does not
constitute an endorsement.
For an explanation of the voluntary nature of standards, the meaning of ISO specific terms and expressions re-
lated to conformity assessment, as well as information about ISO’s adherence to the World Trade Organization
(WTO) principles in the Technical Barriers to Trade (TBT) see www.iso.org/iso/foreword.html.
This document was prepared by Technical Committee ISO/IEC JTC 1, Information technology, Subcommittee
SC 22, Programming languages, their environments and system software interfaces.
This second edition cancels and replaces the first edition (ISO/IEC 19570:2015) which has been technically
revised.
The main changes compared to the previous edition are as follows:
(8.1)
— Eliminate previously standardized functionality.
(8.2)
— Introduce task block.
(8.3)
— Introduce vector and wavefront policies.
(8.4)
— Introduce a template library for parallel for loops.
(8.5)
— Introduce data-parallel vector types.
Any feedback or questions on this document should be directed to the user’s national standards body. A
complete listing of these bodies can be found at www.iso.org/members.html.
c
Foreword �ISO/IEC 2018 – All rights reserved iv
TECHNICAL SPECIFICATION ISO/IEC TS 19570:2018(E)
Programming Languages — Technical Specification for C++
Extensions for Parallelism
1 Scope [parallel.scope]
This document describes requirements for implementations of an interface that computer programs written
++
in the C programming language can use to invoke algorithms with parallel execution. The algorithms
described by this document are realizable across a broad class of computer architectures.
There is a possibility of a subset of the functionality described by this document being standardized in a
++ ++
future version of C , but it is not currently part of any C standard. There is a possibility of some of
the functionality in this document never being standardized, or of it being standardized in a substantially
changed form.
3 ++
The goal of this document is to build widespread existing practice for parallelism in the C programming
language. It gives advice on extensions to those vendors who wish to provide them.
c
Scope �ISO/IEC 2018 – All rights reserved 1
2 Normative references [parallel.references]
The following documents are referred to in the text in such a way that some or all of their content constitutes
requirements of this document. For dated references, only the edition cited applies. For undated references,
the latest edition of the referenced document (including any amendments) applies.
(1.1)
— ISO/IEC 14882:2017, Programming languages — C++
++ ++
ISO/IEC 14882:2017 is herein called the C Standard. References to clauses within the C Standard are
++
written as “C 17 §20”. The library described in ISO/IEC 14882:2017 clauses 20-33 is herein called the C++
Standard Library. The C++ Standard Library components described in ISO/IEC 14882:2017 clauses 28, 29.8
and 23.10.10 are herein called the C++ Standard Algorithms Library.
3 ++
Unless otherwise specified, the whole of the C++ Standard’s Library introduction (C 17 §20) is included
into this document by reference.
c
Normative references �ISO/IEC 2018 – All rights reserved 2
3 Terms and definitions [parallel.defns]
For the purposes of this document, the terms, definitions, and symbols given in ISO/IEC 14882:2017 apply.
ISO and IEC maintain terminological databases for use in standardization at the following addresses:
(2.1)
— ISO Online browsing platform: available at https://www.iso.org/obp
(2.2)
— IEC Electropedia: available at http://www.electropedia.org
c
Terms and definitions �ISO/IEC 2018 – All rights reserved 3
4 General [parallel.general]
4.1 Namespaces and headers [parallel.general.namespaces]
++
Since the extensions described in this document are 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 document are declared in namespace std::experimental::parallelism_v2.
[Note: Once standardized, the components described by this document are expected to be promoted to
namespace std.—end note]
Each header described in this document shall import the contents of std::experimental::parallelism_v2
into std::experimental as if by
namespace std::experimental {
inline namespace parallelism_v2 {}
}
Unless otherwise specified, references to such entities described in this document are assumed to be qualified
++
with std::experimental::parallelism_v2, 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 are provided inside the
header, which shall include the standard contents of as if by
#include
4.2 Feature-testing recommendations [parallel.general.features]
An implementation that provides support for this document shall define the feature test macro(s) in Table 1.
Table 1 — Feature-test macro(s)
Title Subclause Macro Name Value Header
Task Block 8 __cpp_lib_experimental_- 201711
parallel_task_block
Vector and 6.2 __cpp_lib_experimental_- 201711
Wavefront execution_vector_policy
Policies
Template 7.2.2, __cpp_lib_experimental_- 201711
Library for 7.2.3, parallel_for_loop
Parallel For 7.2.4
Loops
Data-Parallel 9 __cpp_lib_experimental_- 201803
Vector Types parallel_simd
c
§ 4.2 �ISO/IEC 2018 – All rights reserved 4
5 Parallel exceptions [parallel.exceptions]
5.1 Header synopsis [parallel.exceptions.synopsis]
namespace std::experimental {
inline namespace parallelism_v2 {
class exception_list : public exception {
public:
using iterator = unspecified;
size_t size() const noexcept;
iterator begin() const noexcept;
iterator end() const noexcept;
const char* what() const noexcept override;
};
}
}
The class exception_list owns a sequence of exception_ptr objects.
exception_list::iterator is an iterator which meets the forward iterator requirements and has a value
type of exception_ptr.
size_t size() const noexcept;
Returns: The number of exception_ptr objects contained within the exception_list.
Complexity: Constant time.
iterator begin() const noexcept;
Returns: An iterator referring to the first exception_ptr object returned within the exception_list.
iterator end() const noexcept;
Returns: An iterator that is past the end of the owned sequence.
const char* what() const noexcept override;
Returns: An implementation-defined NTBS.
c
§ 5.1 �ISO/IEC 2018 – All rights reserved 5
6 Execution policies [parallel.execpol]
6.1 Header synopsis [parallel.execpol.synopsis]
#include
namespace std::experimental {
inline namespace parallelism_v2 {
namespace execution {
// 6.2, Unsequenced execution policy
class unsequenced_policy;
// 6.3, Vector execution policy
class vector_policy;
// 6.4, Execution policy objects
inline constexpr unsequenced_policy unseq{ unspecified };
inline constexpr vector_policy vec{ unspecified };
}
}
}
6.2 Unsequenced execution policy [parallel.execpol.unseq]
class unsequenced_policy { unspecified };
The class unsequenced_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, e.g., executed on
a single thread using instructions that operate on multiple data items.
The invocations of element access functions in parallel algorithms invoked with an execution policy of type
unsequenced_policy are permitted to execute in an unordered fashion in the calling thread, unsequenced
with respect to one another within the calling thread. [Note: This means that multiple function object
invocations may be interleaved on a single thread.—end note]
3 ++ ++
[Note: This overrides the usual guarantee from the C Standard, C 17 §4.6 that function executions do
not overlap with one another. —end note]
During the execution of a parallel algorithm with the experimental::execution::unsequenced_policy
policy, if the invocation of an element access function exits via an uncaught exception, terminate() will be
called.
6.3 Vector execution policy [parallel.execpol.vec]
class vector_policy { unspecified };
The class vector_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. Additionally,
such vectorization will result in an execution that respects the sequencing constraints of wavefront application
(7.1). [Note: The implementation thus makes stronger guarantees than for unsequenced_policy, for
example.—end note]
The invocations of element access functions in parallel algorithm
...
Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.