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