![]() |
hpx::parallel::v1::execution_policy
// In header: <hpx/parallel/execution_policy.hpp> class execution_policy { public: // construct/copy/destruct template<typename ExPolicy> execution_policy(ExPolicy const &, typename boost::enable_if< is_execution_policy< ExPolicy >, ExPolicy >::type * = 0); execution_policy(execution_policy &&); template<typename ExPolicy> execution_policy& operator=(ExPolicy const &); execution_policy& operator=(execution_policy &&); // public member functions std::type_info const & type() const; template<typename ExPolicy> ExPolicy * get(); template<typename ExPolicy> ExPolicy const * get() const; };
An execution policy is an object that expresses the requirements on the ordering of functions invoked as a consequence of the invocation of a standard algorithm. Execution policies afford standard algorithms the discretion to execute in parallel.
The class execution_policy is a dynamic container for execution policy objects. execution_policy allows dynamic control over standard algorithm execution.
Objects of type execution_policy shall be constructible and assignable from objects of type T for which is_execution_policy<T>::value is true.
execution_policy
public
construct/copy/destructtemplate<typename ExPolicy> execution_policy(ExPolicy const & policy, typename boost::enable_if< is_execution_policy< ExPolicy >, ExPolicy >::type * = 0);
Effects: Constructs an execution_policy
object with a copy of exec's state Requires: is_execution_policy<T>::value is true
Parameters: |
|
execution_policy(execution_policy && policy);
Move constructs a new execution_policy
object.
Parameters: |
|
template<typename ExPolicy> execution_policy& operator=(ExPolicy const & policy);
Effects: Assigns a copy of exec's state to *this Returns: *this Requires: is_execution_policy<T>::value is true
Parameters: |
|
execution_policy& operator=(execution_policy && policy);
Move assigns a new execution policy to the object.
Parameters: |
|
execution_policy
public member functionsstd::type_info const & type() const;
Returns: typeid(T), such that T is the type of the execution policy object contained by *this
template<typename ExPolicy> ExPolicy * get();
Returns: If target_type() == typeid(T), a pointer to the stored execution policy object; otherwise a null pointer Requires: is_execution_policy<T>::value is true
template<typename ExPolicy> ExPolicy const * get() const;
Returns: If target_type() == typeid(T), a pointer to the stored execution policy object; otherwise a null pointer Requires: is_execution_policy<T>::value is true