From Jason Turner

[algorithms.parallel.defns]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpv2v70oqv/{from.md → to.md} +17 -7
tmp/tmpv2v70oqv/{from.md → to.md} RENAMED
@@ -3,22 +3,31 @@
3
  Subclause [[algorithms.parallel]] describes components that C++ programs
4
  may use to perform operations on containers and other sequences in
5
  parallel.
6
 
7
  A *parallel algorithm* is a function template listed in this document
8
- with a template parameter named `ExecutionPolicy`.
 
9
 
10
- Parallel algorithms access objects indirectly accessible via their
 
 
 
 
 
 
 
 
11
  arguments by invoking the following functions:
12
 
13
- - All operations of the categories of the iterators that the algorithm
14
- is instantiated with.
15
  - Operations on those sequence elements that are required by its
16
  specification.
17
- - User-provided function objects to be applied during the execution of
18
  the algorithm, if required by the specification.
19
- - Operations on those function objects required by the specification.
20
  \[*Note 1*: See  [[algorithms.requirements]]. — *end note*]
21
 
22
  These functions are herein called *element access functions*.
23
 
24
  [*Example 1*:
@@ -35,11 +44,12 @@ The `sort` function may invoke the following element access functions:
35
  — *end example*]
36
 
37
  A standard library function is *vectorization-unsafe* if it is specified
38
  to synchronize with another function invocation, or another function
39
  invocation is specified to synchronize with it, and if it is not a
40
- memory allocation or deallocation function.
 
41
 
42
  [*Note 2*: Implementations must ensure that internal synchronization
43
  inside standard library functions does not prevent forward progress when
44
  those functions are executed by threads of execution with weakly
45
  parallel forward progress guarantees. — *end note*]
 
3
  Subclause [[algorithms.parallel]] describes components that C++ programs
4
  may use to perform operations on containers and other sequences in
5
  parallel.
6
 
7
  A *parallel algorithm* is a function template listed in this document
8
+ with a template parameter named `ExecutionPolicy` or constrained by the
9
+ following exposition-only concept:
10
 
11
+ ``` cpp
12
+ template<class Ep>
13
+ concept execution-policy = is_execution_policy_v<remove_cvref_t<Ep>>; // exposition only
14
+ ```
15
+
16
+ Such a template parameter is termed an
17
+ *execution policy template parameter*.
18
+
19
+ A parallel algorithm accesses objects indirectly accessible via its
20
  arguments by invoking the following functions:
21
 
22
+ - All operations of the categories of the iterators, sentinels, or
23
+ `mdspan` types that the algorithm is instantiated with.
24
  - Operations on those sequence elements that are required by its
25
  specification.
26
+ - User-provided invocable objects to be applied during the execution of
27
  the algorithm, if required by the specification.
28
+ - Operations on those invocable objects required by the specification.
29
  \[*Note 1*: See  [[algorithms.requirements]]. — *end note*]
30
 
31
  These functions are herein called *element access functions*.
32
 
33
  [*Example 1*:
 
44
  — *end example*]
45
 
46
  A standard library function is *vectorization-unsafe* if it is specified
47
  to synchronize with another function invocation, or another function
48
  invocation is specified to synchronize with it, and if it is not a
49
+ memory allocation or deallocation function or lock-free atomic
50
+ modify-write operation [[atomics.order]].
51
 
52
  [*Note 2*: Implementations must ensure that internal synchronization
53
  inside standard library functions does not prevent forward progress when
54
  those functions are executed by threads of execution with weakly
55
  parallel forward progress guarantees. — *end note*]