[algorithms.parallel.overloads] (original) (raw)

26 Algorithms library [algorithms]

26.3.5 Parallel algorithm overloads [algorithms.parallel.overloads]

Parallel algorithms are algorithm overloads.

Each parallel algorithm overload has an additional function parameter P of type T&&as the first function parameter, where T is the execution policy template parameter.

[Note 1:

Not all algorithms have parallel algorithm overloads.

— _end note_]

Unless otherwise specified, the semantics of calling a parallel algorithm overload are identical to calling the corresponding algorithm overload without the parameter P, using all but the first argument.

Unless otherwise specified, the complexity requirements of a parallel algorithm overload are relaxed from the complexity requirements of the corresponding overload without the parameter Pas follows: when the guarantee says “at most _expr_” or “exactly expr_” and does not specify the number of assignments or swaps, and_expr is not already expressed with notation, the complexity of the algorithm shall be .

A parallel algorithm with a template parameter named ExecutionPolicyshall not participate in overload resolution unless that template parameter satisfies execution-policy.