[execpol.general] (original) (raw)

26 Algorithms library [algorithms]

26.3 Parallel algorithms [algorithms.parallel]

26.3.6 Execution policies [execpol]

26.3.6.1 General [execpol.general]

Subclause [execpol] describes classes that are execution policy types.

An object of an execution policy type indicates the kinds of parallelism allowed in the execution of an algorithm and expresses the consequent requirements on the element access functions.

Execution policy types are declared in header .

[Example 1: using namespace std; vector<int> v = ; sort(v.begin(), v.end()); sort(execution::seq, v.begin(), v.end()); sort(execution::par, v.begin(), v.end()); sort(execution::par_unseq, v.begin(), v.end()); — _end example_]

[Note 1:

Implementations can provide additional execution policies to those described in this document as extensions to address parallel architectures that require idiosyncratic parameters for efficient execution.

— _end note_]