Created on 2016-05-25.00:00:00 last changed 90 months ago
Proposed resolution:
This wording is relative to N4582.
Change [algorithms.parallel.exec] as indicated:
The invocations of element access functions in parallel algorithms invoked with an execution policy object of type sequential_execution_policy all occur
are indeterminately sequenced (1.9)in the calling thread. [Note: The invocations are not interleaved; see [intro.execution] — end note]
[ 2016-06 Oulu ]
Could be P0 after SG1 gives OK
Tuesday, Oulu: Hans Ok'd this
Friday: status to Immediate
The paragraph describing the effect of composing sequential_execution_policy with parallel algorithms says:
The invocations of element access functions in parallel algorithms invoked with an execution policy object of type sequential_execution_policy are indeterminately sequenced (1.9) in the calling thread.
The intended behavior of sequential_execution_policy is to match the classic-style algorithm semantics, cf. [algorithms.parallel.overloads] p2:
Unless otherwise specified, the semantics of ExecutionPolicy algorithm overloads are identical to their overloads without.
Because many classic-style algorithms execute element access functions in a specified sequence, [algorithms.parallel.exec] p2 introduces unintentionally different semantics between classic-style algorithms and parallel algorithms invoked with sequential_execution_policy.
The unintentional change to [algorithms.parallel.exec] p2 was introduced in the revision from P0024R1 to P0024R0 when the wording was changed fromThe invocations of element access functions in parallel algorithms invoked with an execution policy object of type sequential_execution_policy execute in sequential order in the calling thread.
to
The invocations of element access functions in parallel algorithms invoked with an execution policy object of type sequential_execution_policy are indeterminately sequenced (1.9) in the calling thread.
Suggested resolution:
To restore the originally intended behavior of sequential_execution_policy, Jens Maurer suggests replacing [algorithms.parallel.exec] p2 with:The invocations of element access functions in parallel algorithms invoked with an execution policy object of type sequential_execution_policy all occur in the calling thread. [Note: The invocations are not interleaved; see [intro.execution] — end note]
History | |||
---|---|---|---|
Date | User | Action | Args |
2017-07-30 20:15:43 | admin | set | status: wp -> c++17 |
2016-06-28 13:14:43 | admin | set | status: immediate -> wp |
2016-06-27 16:42:33 | admin | set | status: open -> immediate |
2016-06-20 16:35:58 | admin | set | messages: + msg8182 |
2016-06-20 16:35:58 | admin | set | status: new -> open |
2016-05-29 13:09:54 | admin | set | messages: + msg8155 |
2016-05-25 00:00:00 | admin | create |