HPX - High Performance ParalleX

PrevUpHomeNext

Class execution_policy

hpx::parallel::v1::execution_policy

Synopsis

// 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;
};

Description

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.

  1. The class execution_policy is a dynamic container for execution policy objects. execution_policy allows dynamic control over standard algorithm execution.

  2. 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/destruct

  1. template<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:

    policy

    Specifies the inner execution policy

  2. execution_policy(execution_policy && policy);

    Move constructs a new execution_policy object.

    Parameters:

    policy

    Specifies the inner execution policy

  3. 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:

    policy

    Specifies the inner execution policy

  4. execution_policy& operator=(execution_policy && policy);

    Move assigns a new execution policy to the object.

    Parameters:

    policy

    Specifies the inner execution policy

execution_policy public member functions

  1. std::type_info const & type() const;

    Returns: typeid(T), such that T is the type of the execution policy object contained by *this

  2. 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

  3. 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


PrevUpHomeNext