@@ -15217,172 +15217,6 @@
1521715217\tcode{hash<type_index>()(index)} shall evaluate to the same result as \tcode{index.hash_code()}.
1521815218\end{itemdescr}
1521915219
15220- \rSec1[execpol]{Execution policies}
15221- \rSec2[execpol.general]{General}
15222-
15223- \pnum
15224- Subclause~\ref{execpol} describes classes that are \defn{execution policy} types. An
15225- object of an execution policy type indicates the kinds of parallelism allowed
15226- in the execution of an algorithm and expresses the consequent requirements on
15227- the element access functions.
15228- Execution policy types are declared in header \libheaderref{execution}.
15229- \begin{example}
15230- \begin{codeblock}
15231- using namespace std;
15232- vector<int> v = @\commentellip@;
15233-
15234- // standard sequential sort
15235- sort(v.begin(), v.end());
15236-
15237- // explicitly sequential sort
15238- sort(execution::seq, v.begin(), v.end());
15239-
15240- // permitting parallel execution
15241- sort(execution::par, v.begin(), v.end());
15242-
15243- // permitting vectorization as well
15244- sort(execution::par_unseq, v.begin(), v.end());
15245- \end{codeblock}
15246- \end{example}
15247- \begin{note}
15248- Implementations can provide additional execution policies
15249- to those described in this document as extensions
15250- to address parallel architectures that require idiosyncratic
15251- parameters for efficient execution.
15252- \end{note}
15253-
15254- \rSec2[execpol.type]{Execution policy type trait}
15255-
15256- \indexlibraryglobal{is_execution_policy}%
15257- \begin{itemdecl}
15258- template<class T> struct is_execution_policy { @\seebelow@ };
15259- \end{itemdecl}
15260-
15261- \begin{itemdescr}
15262- \pnum
15263- \tcode{is_execution_policy} can be used to detect execution policies for the
15264- purpose of excluding function signatures from otherwise ambiguous overload
15265- resolution participation.
15266-
15267- \pnum
15268- \tcode{is_execution_policy<T>} is a \oldconcept{UnaryTypeTrait} with a
15269- base characteristic of \tcode{true_type} if \tcode{T} is the type of a standard
15270- or \impldef{additional execution policies supported by parallel algorithms}
15271- execution policy, otherwise \tcode{false_type}.
15272-
15273- \begin{note}
15274- This provision reserves the privilege of creating non-standard execution
15275- policies to the library implementation.
15276- \end{note}
15277-
15278- \pnum
15279- The behavior of a program that adds specializations for
15280- \tcode{is_execution_policy} is undefined.
15281- \end{itemdescr}
15282-
15283- \rSec2[execpol.seq]{Sequenced execution policy}
15284-
15285- \indexlibraryglobal{execution::sequenced_policy}%
15286- \begin{itemdecl}
15287- class execution::sequenced_policy { @\unspec@ };
15288- \end{itemdecl}
15289-
15290- \begin{itemdescr}
15291- \pnum
15292- The class \tcode{execution::sequenced_policy} is an execution policy type used
15293- as a unique type to disambiguate parallel algorithm overloading and require
15294- that a parallel algorithm's execution may not be parallelized.
15295-
15296- \pnum
15297- During the execution of a parallel algorithm with
15298- the \tcode{execution::sequenced_policy} policy,
15299- if the invocation of an element access function exits via an exception,
15300- \tcode{terminate} is invoked\iref{except.terminate}.
15301- \end{itemdescr}
15302-
15303- \rSec2[execpol.par]{Parallel execution policy}
15304-
15305- \indexlibraryglobal{execution::parallel_policy}%
15306- \begin{itemdecl}
15307- class execution::parallel_policy { @\unspec@ };
15308- \end{itemdecl}
15309-
15310- \begin{itemdescr}
15311- \pnum
15312- The class \tcode{execution::parallel_policy} is an execution policy type used as
15313- a unique type to disambiguate parallel algorithm overloading and indicate that
15314- a parallel algorithm's execution may be parallelized.
15315-
15316- \pnum
15317- During the execution of a parallel algorithm with
15318- the \tcode{execution::parallel_policy} policy,
15319- if the invocation of an element access function exits via an exception,
15320- \tcode{terminate} is invoked\iref{except.terminate}.
15321- \end{itemdescr}
15322-
15323- \rSec2[execpol.parunseq]{Parallel and unsequenced execution policy}
15324-
15325- \indexlibraryglobal{execution::parallel_unsequenced_policy}%
15326- \begin{itemdecl}
15327- class execution::parallel_unsequenced_policy { @\unspec@ };
15328- \end{itemdecl}
15329-
15330- \begin{itemdescr}
15331- \pnum
15332- The class \tcode{execution::parallel_unsequenced_policy} is an execution policy type
15333- used as a unique type to disambiguate parallel algorithm overloading and
15334- indicate that a parallel algorithm's execution may be parallelized and
15335- vectorized.
15336-
15337- \pnum
15338- During the execution of a parallel algorithm with
15339- the \tcode{execution::parallel_unsequenced_policy} policy,
15340- if the invocation of an element access function exits via an exception,
15341- \tcode{terminate} is invoked\iref{except.terminate}.
15342- \end{itemdescr}
15343-
15344- \rSec2[execpol.unseq]{Unsequenced execution policy}
15345-
15346- \indexlibraryglobal{execution::unsequenced_policy}%
15347- \begin{itemdecl}
15348- class execution::unsequenced_policy { @\unspec@ };
15349- \end{itemdecl}
15350-
15351- \begin{itemdescr}
15352- \pnum
15353- The class \tcode{unsequenced_policy} is an execution policy type
15354- used as a unique type to disambiguate parallel algorithm overloading and
15355- indicate that a parallel algorithm's execution may be vectorized,
15356- e.g., executed on a single thread using instructions
15357- that operate on multiple data items.
15358-
15359- \pnum
15360- During the execution of a parallel algorithm with
15361- the \tcode{execution::unsequenced_policy} policy,
15362- if the invocation of an element access function exits via an exception,
15363- \tcode{terminate} is invoked\iref{except.terminate}.
15364- \end{itemdescr}
15365-
15366- \rSec2[execpol.objects]{Execution policy objects}
15367-
15368- \indexlibraryglobal{seq}%
15369- \indexlibraryglobal{par}%
15370- \indexlibraryglobal{par_unseq}%
15371- \indexlibrarymember{execution}{seq}%
15372- \indexlibrarymember{execution}{par}%
15373- \indexlibrarymember{execution}{par_unseq}%
15374- \begin{itemdecl}
15375- inline constexpr execution::sequenced_policy execution::seq{ @\unspec@ };
15376- inline constexpr execution::parallel_policy execution::par{ @\unspec@ };
15377- inline constexpr execution::parallel_unsequenced_policy execution::par_unseq{ @\unspec@ };
15378- inline constexpr execution::unsequenced_policy execution::unseq{ @\unspec@ };
15379- \end{itemdecl}
15380-
15381- \begin{itemdescr}
15382- \pnum
15383- The header \libheaderref{execution} declares global objects associated with each type of execution policy.
15384- \end{itemdescr}
15385-
1538615220\rSec1[charconv]{Primitive numeric conversions}
1538715221
1538815222\rSec2[charconv.syn]{Header \tcode{<charconv>} synopsis}
0 commit comments