executors¶
The contents of this module can be included with the header
hpx/modules/executors.hpp
. These headers may be used by user-code but are not
guaranteed stable (neither header location nor contents). You are using these at
your own risk. If you wish to use non-public functionality from a module we
strongly suggest only including the module header hpx/modules/executors.hpp
, not
the particular header in which the functionality you would like to use is
defined. See Public API for a list of names that are part of the public
HPX API.
Header hpx/executors/apply.hpp
¶
Header hpx/executors/async.hpp
¶
Header hpx/executors/current_executor.hpp
¶
-
namespace
hpx
-
namespace
parallel
-
namespace
execution
Typedefs
-
using
current_executor
= parallel::execution::thread_pool_executor¶
-
using
-
namespace
-
namespace
this_thread
¶ Functions
-
parallel::execution::current_executor
get_executor
(error_code &ec = throws)¶ Returns a reference to the executor which was used to create the current thread.
- Exceptions
If
:&ec != &throws
, never throws, but will set ec to an appropriate value when an error occurs. Otherwise, this function will throw an hpx::exception with an error code of hpx::yield_aborted if it is signaled with wait_aborted. If called outside of a HPX-thread, this function will throw an hpx::exception with an error code of hpx::null_thread_id. If this function is called while the thread-manager is not running, it will throw an hpx::exception with an error code of hpx::invalid_status.
-
parallel::execution::current_executor
-
namespace
threads
Functions
-
parallel::execution::current_executor
get_executor
(thread_id_type const &id, error_code &ec = throws)¶ Returns a reference to the executor which was used to create the given thread.
- Exceptions
If
:&ec != &throws
, never throws, but will set ec to an appropriate value when an error occurs. Otherwise, this function will throw an hpx::exception with an error code of hpx::yield_aborted if it is signaled with wait_aborted. If called outside of a HPX-thread, this function will throw an hpx::exception with an error code of hpx::null_thread_id. If this function is called while the thread-manager is not running, it will throw an hpx::exception with an error code of hpx::invalid_status.
-
parallel::execution::current_executor
-
namespace
Header hpx/executors/dataflow.hpp
¶
Header hpx/executors/datapar/execution_policy.hpp
¶
Header hpx/executors/datapar/execution_policy_fwd.hpp
¶
Header hpx/executors/exception_list.hpp
¶
Header hpx/executors/execution_policy.hpp
¶
-
namespace
hpx
-
namespace
parallel
-
namespace
execution
Variables
-
constexpr task_policy_tag
task
¶ Default sequential execution policy object.
-
constexpr sequenced_policy
seq
¶ Default sequential execution policy object.
-
constexpr parallel_policy
par
¶ Default parallel execution policy object.
-
constexpr parallel_unsequenced_policy
par_unseq
¶ Default vector execution policy object.
-
struct
parallel_policy
¶ - #include <execution_policy.hpp>
The class parallel_policy is an execution policy type used as a unique type to disambiguate parallel algorithm overloading and indicate that a parallel algorithm’s execution may be parallelized.
Subclassed by hpx::parallel::execution::parallel_policy_shim< Executor, Parameters >
Public Types
-
typedef parallel_executor
executor_type
¶ The type of the executor associated with this execution policy.
-
typedef execution::extract_executor_parameters<executor_type>::type
executor_parameters_type
¶ The type of the associated executor parameters object which is associated with this execution policy
-
typedef parallel_execution_tag
execution_category
¶ The category of the execution agents created by this execution policy.
Public Functions
-
constexpr parallel_task_policy
operator()
(task_policy_tag) const¶ Create a new parallel_policy referencing a chunk size.
- Return
The new parallel_policy
- Parameters
tag
: [in] Specify that the corresponding asynchronous execution policy should be used
-
template<typename
Executor
>
rebind_executor<parallel_policy, Executor, executor_parameters_type>::typeon
(Executor &&exec) const¶ Create a new parallel_policy referencing an executor and a chunk size.
- Return
The new parallel_policy
- Parameters
exec
: [in] The executor to use for the execution of the parallel algorithm the returned execution policy is used with
-
template<typename ...
Parameters
, typenameParametersType
= typename executor_parameters_join<Parameters...>::type>
rebind_executor<parallel_policy, executor_type, ParametersType>::typewith
(Parameters&&... params) const¶ Create a new parallel_policy from the given execution parameters
- Note
Requires: is_executor_parameters<Parameters>::value is true
- Return
The new parallel_policy
- Template Parameters
Parameters
: The type of the executor parameters to associate with this execution policy.
- Parameters
params
: [in] The executor parameters to use for the execution of the parallel algorithm the returned execution policy is used with.
-
executor_type &
executor
()¶ Return the associated executor object.
-
constexpr executor_type const &
executor
() const¶ Return the associated executor object.
-
executor_parameters_type &
parameters
()¶ Return the associated executor parameters object.
-
constexpr executor_parameters_type const &
parameters
() const¶ Return the associated executor parameters object.
Private Functions
Friends
-
friend
hpx::parallel::execution::hpx::serialization::access
-
template<typename
Executor_
, typenameParameters_
>
structrebind
¶ - #include <execution_policy.hpp>
Rebind the type of executor used by this execution policy. The execution category of Executor shall not be weaker than that of this execution policy
Public Types
-
typedef parallel_policy_shim<Executor_, Parameters_>
type
¶ The type of the rebound execution policy.
-
typedef parallel_policy_shim<Executor_, Parameters_>
-
typedef parallel_executor
-
template<typename
Executor
, typenameParameters
>
structparallel_policy_shim
: public hpx::parallel::execution::parallel_policy¶ - #include <execution_policy.hpp>
The class parallel_policy_shim is an execution policy type used as a unique type to disambiguate parallel algorithm overloading and indicate that a parallel algorithm’s execution may be parallelized.
Public Types
-
typedef Executor
executor_type
¶ The type of the executor associated with this execution policy.
-
typedef Parameters
executor_parameters_type
¶ The type of the associated executor parameters object which is associated with this execution policy
-
typedef hpx::traits::executor_execution_category<executor_type>::type
execution_category
¶ The category of the execution agents created by this execution policy.
Public Functions
-
constexpr parallel_task_policy_shim<Executor, Parameters>
operator()
(task_policy_tag tag) const¶ Create a new parallel_policy referencing a chunk size.
- Return
The new parallel_policy
- Parameters
tag
: [in] Specify that the corresponding asynchronous execution policy should be used
-
template<typename
Executor_
>
rebind_executor<parallel_policy_shim, Executor_, executor_parameters_type>::typeon
(Executor_ &&exec) const¶ Create a new parallel_policy from the given executor
- Note
Requires: is_executor<Executor>::value is true
- Return
The new parallel_policy
- Template Parameters
Executor
: The type of the executor to associate with this execution policy.
- Parameters
exec
: [in] The executor to use for the execution of the parallel algorithm the returned execution policy is used with.
-
template<typename ...
Parameters_
, typenameParametersType
= typename executor_parameters_join<Parameters_...>::type>
rebind_executor<parallel_policy_shim, executor_type, ParametersType>::typewith
(Parameters_&&... params) const¶ Create a new parallel_policy_shim from the given execution parameters
- Note
Requires: is_executor_parameters<Parameters>::value is true
- Return
The new parallel_policy_shim
- Template Parameters
Parameters
: The type of the executor parameters to associate with this execution policy.
- Parameters
params
: [in] The executor parameters to use for the execution of the parallel algorithm the returned execution policy is used with.
-
Executor &
executor
()¶ Return the associated executor object.
-
constexpr Executor const &
executor
() const¶ Return the associated executor object.
-
Parameters &
parameters
()¶ Return the associated executor parameters object.
-
constexpr Parameters const &
parameters
() const¶ Return the associated executor parameters object.
-
template<typename
Executor_
, typenameParameters_
>
structrebind
¶ - #include <execution_policy.hpp>
Rebind the type of executor used by this execution policy. The execution category of Executor shall not be weaker than that of this execution policy
Public Types
-
template<>
typedef parallel_policy_shim<Executor_, Parameters_>type
¶ The type of the rebound execution policy.
-
template<>
-
typedef Executor
-
struct
parallel_task_policy
¶ - #include <execution_policy.hpp>
Extension: The class parallel_task_policy is an execution policy type used as a unique type to disambiguate parallel algorithm overloading and indicate that a parallel algorithm’s execution may be parallelized.
The algorithm returns a future representing the result of the corresponding algorithm when invoked with the parallel_policy.
Subclassed by hpx::parallel::execution::parallel_task_policy_shim< Executor, Parameters >
Public Types
-
typedef parallel_executor
executor_type
¶ The type of the executor associated with this execution policy.
-
typedef execution::extract_executor_parameters<executor_type>::type
executor_parameters_type
¶ The type of the associated executor parameters object which is associated with this execution policy
-
typedef parallel_execution_tag
execution_category
¶ The category of the execution agents created by this execution policy.
Public Functions
-
constexpr parallel_task_policy
operator()
(task_policy_tag) const¶ Create a new parallel_task_policy from itself
- Return
The new parallel_task_policy
- Parameters
tag
: [in] Specify that the corresponding asynchronous execution policy should be used
-
template<typename
Executor
>
rebind_executor<parallel_task_policy, Executor, executor_parameters_type>::typeon
(Executor &&exec) const¶ Create a new parallel_task_policy from given executor
- Note
Requires: is_executor<Executor>::value is true
- Return
The new parallel_task_policy
- Template Parameters
Executor
: The type of the executor to associate with this execution policy.
- Parameters
exec
: [in] The executor to use for the execution of the parallel algorithm the returned execution policy is used with.
-
template<typename ...
Parameters
, typenameParametersType
= typename executor_parameters_join<Parameters...>::type>
rebind_executor<parallel_task_policy, executor_type, ParametersType>::typewith
(Parameters&&... params) const¶ Create a new parallel_policy_shim from the given execution parameters
- Note
Requires: all parameters are executor_parameters, different parameter types can’t be duplicated
- Return
The new parallel_policy_shim
- Template Parameters
Parameters
: The type of the executor parameters to associate with this execution policy.
- Parameters
params
: [in] The executor parameters to use for the execution of the parallel algorithm the returned execution policy is used with.
-
executor_type &
executor
()¶ Return the associated executor object.
-
constexpr executor_type const &
executor
() const¶ Return the associated executor object.
-
executor_parameters_type &
parameters
()¶ Return the associated executor parameters object.
-
constexpr executor_parameters_type const &
parameters
() const¶ Return the associated executor parameters object.
Private Functions
Friends
-
friend
hpx::parallel::execution::hpx::serialization::access
-
template<typename
Executor_
, typenameParameters_
>
structrebind
¶ - #include <execution_policy.hpp>
Rebind the type of executor used by this execution policy. The execution category of Executor shall not be weaker than that of this execution policy
Public Types
-
typedef parallel_task_policy_shim<Executor_, Parameters_>
type
¶ The type of the rebound execution policy.
-
typedef parallel_task_policy_shim<Executor_, Parameters_>
-
typedef parallel_executor
-
template<typename
Executor
, typenameParameters
>
structparallel_task_policy_shim
: public hpx::parallel::execution::parallel_task_policy¶ - #include <execution_policy.hpp>
Extension: The class parallel_task_policy_shim is an execution policy type used as a unique type to disambiguate parallel algorithm overloading based on combining a underlying parallel_task_policy and an executor and indicate that a parallel algorithm’s execution may be parallelized.
Public Types
-
typedef Executor
executor_type
¶ The type of the executor associated with this execution policy.
-
typedef Parameters
executor_parameters_type
¶ The type of the associated executor parameters object which is associated with this execution policy
-
typedef hpx::traits::executor_execution_category<executor_type>::type
execution_category
¶ The category of the execution agents created by this execution policy.
Public Functions
-
constexpr parallel_task_policy_shim
operator()
(task_policy_tag tag) const¶ Create a new parallel_task_policy_shim from itself
- Return
The new sequenced_task_policy
- Parameters
tag
: [in] Specify that the corresponding asynchronous execution policy should be used
-
template<typename
Executor_
>
rebind_executor<parallel_task_policy_shim, Executor_, executor_parameters_type>::typeon
(Executor_ &&exec) const¶ Create a new parallel_task_policy from the given executor
- Note
Requires: is_executor<Executor>::value is true
- Return
The new parallel_task_policy
- Template Parameters
Executor
: The type of the executor to associate with this execution policy.
- Parameters
exec
: [in] The executor to use for the execution of the parallel algorithm the returned execution policy is used with.
-
template<typename ...
Parameters_
, typenameParametersType
= typename executor_parameters_join<Parameters_...>::type>
rebind_executor<parallel_task_policy_shim, executor_type, ParametersType>::typewith
(Parameters_&&... params) const¶ Create a new parallel_policy_shim from the given execution parameters
- Note
Requires: all parameters are executor_parameters, different parameter types can’t be duplicated
- Return
The new parallel_policy_shim
- Template Parameters
Parameters
: The type of the executor parameters to associate with this execution policy.
- Parameters
params
: [in] The executor parameters to use for the execution of the parallel algorithm the returned execution policy is used with.
-
Executor &
executor
()¶ Return the associated executor object.
-
constexpr Executor const &
executor
() const¶ Return the associated executor object.
-
Parameters &
parameters
()¶ Return the associated executor parameters object.
-
constexpr Parameters const &
parameters
() const¶ Return the associated executor parameters object.
-
template<typename
Executor_
, typenameParameters_
>
structrebind
¶ - #include <execution_policy.hpp>
Rebind the type of executor used by this execution policy. The execution category of Executor shall not be weaker than that of this execution policy
Public Types
-
template<>
typedef parallel_task_policy_shim<Executor_, Parameters_>type
¶ The type of the rebound execution policy.
-
template<>
-
typedef Executor
-
struct
parallel_unsequenced_policy
¶ - #include <execution_policy.hpp>
The class parallel_unsequenced_policy is an execution policy type used as a unique type to disambiguate parallel algorithm overloading and indicate that a parallel algorithm’s execution may be vectorized.
Public Types
-
typedef parallel_executor
executor_type
¶ The type of the executor associated with this execution policy.
-
typedef execution::extract_executor_parameters<executor_type>::type
executor_parameters_type
¶ The type of the associated executor parameters object which is associated with this execution policy
-
typedef parallel_execution_tag
execution_category
¶ The category of the execution agents created by this execution policy.
Public Functions
-
parallel_unsequenced_policy
operator()
(task_policy_tag) const¶ Create a new parallel_unsequenced_policy from itself
- Return
The new parallel_unsequenced_policy
- Parameters
tag
: [in] Specify that the corresponding asynchronous execution policy should be used
-
executor_type &
executor
()¶ Return the associated executor object.
-
constexpr executor_type const &
executor
() const¶ Return the associated executor object.
-
executor_parameters_type &
parameters
()¶ Return the associated executor parameters object.
-
constexpr executor_parameters_type const &
parameters
() const¶ Return the associated executor parameters object.
Private Functions
Friends
-
friend
hpx::parallel::execution::hpx::serialization::access
-
typedef parallel_executor
-
struct
sequenced_policy
¶ - #include <execution_policy.hpp>
The class sequenced_policy is an execution policy type used as a unique type to disambiguate parallel algorithm overloading and require that a parallel algorithm’s execution may not be parallelized.
Subclassed by hpx::parallel::execution::sequenced_policy_shim< Executor, Parameters >
Public Types
-
typedef sequenced_executor
executor_type
¶ The type of the executor associated with this execution policy.
-
typedef execution::extract_executor_parameters<executor_type>::type
executor_parameters_type
¶ The type of the associated executor parameters object which is associated with this execution policy
-
typedef sequenced_execution_tag
execution_category
¶ The category of the execution agents created by this execution policy.
Public Functions
-
constexpr sequenced_task_policy
operator()
(task_policy_tag) const¶ Create a new sequenced_task_policy.
- Return
The new sequenced_task_policy
- Parameters
tag
: [in] Specify that the corresponding asynchronous execution policy should be used
-
template<typename
Executor
>
rebind_executor<sequenced_policy, Executor, executor_parameters_type>::typeon
(Executor &&exec) const¶ Create a new sequenced_policy from the given executor
- Note
Requires: is_executor<Executor>::value is true
- Return
The new sequenced_policy
- Template Parameters
Executor
: The type of the executor to associate with this execution policy.
- Parameters
exec
: [in] The executor to use for the execution of the parallel algorithm the returned execution policy is used with.
-
template<typename ...
Parameters
, typenameParametersType
= typename executor_parameters_join<Parameters...>::type>
rebind_executor<sequenced_policy, executor_type, ParametersType>::typewith
(Parameters&&... params) const¶ Create a new sequenced_policy from the given execution parameters
- Note
Requires: all parameters are executor_parameters, different parameter types can’t be duplicated
- Return
The new sequenced_policy
- Template Parameters
Parameters
: The type of the executor parameters to associate with this execution policy.
- Parameters
params
: [in] The executor parameters to use for the execution of the parallel algorithm the returned execution policy is used with.
-
executor_type &
executor
()¶ Return the associated executor object. Return the associated executor object.
-
constexpr executor_type const &
executor
() const¶ Return the associated executor object.
-
executor_parameters_type &
parameters
()¶ Return the associated executor parameters object.
-
constexpr executor_parameters_type const &
parameters
() const¶ Return the associated executor parameters object.
Private Functions
Friends
-
friend
hpx::parallel::execution::hpx::serialization::access
-
template<typename
Executor_
, typenameParameters_
>
structrebind
¶ - #include <execution_policy.hpp>
Rebind the type of executor used by this execution policy. The execution category of Executor shall not be weaker than that of this execution policy
Public Types
-
typedef sequenced_policy_shim<Executor_, Parameters_>
type
¶ The type of the rebound execution policy.
-
typedef sequenced_policy_shim<Executor_, Parameters_>
-
typedef sequenced_executor
-
template<typename
Executor
, typenameParameters
>
structsequenced_policy_shim
: public hpx::parallel::execution::sequenced_policy¶ - #include <execution_policy.hpp>
The class sequenced_policy is an execution policy type used as a unique type to disambiguate parallel algorithm overloading and require that a parallel algorithm’s execution may not be parallelized.
Public Types
-
typedef Executor
executor_type
¶ The type of the executor associated with this execution policy.
-
typedef Parameters
executor_parameters_type
¶ The type of the associated executor parameters object which is associated with this execution policy
-
typedef hpx::traits::executor_execution_category<executor_type>::type
execution_category
¶ The category of the execution agents created by this execution policy.
Public Functions
-
constexpr sequenced_task_policy_shim<Executor, Parameters>
operator()
(task_policy_tag tag) const¶ Create a new sequenced_task_policy.
- Return
The new sequenced_task_policy_shim
- Parameters
tag
: [in] Specify that the corresponding asynchronous execution policy should be used
-
template<typename
Executor_
>
rebind_executor<sequenced_policy_shim, Executor_, executor_parameters_type>::typeon
(Executor_ &&exec) const¶ Create a new sequenced_policy from the given executor
- Note
Requires: is_executor<Executor>::value is true
- Return
The new sequenced_policy
- Template Parameters
Executor
: The type of the executor to associate with this execution policy.
- Parameters
exec
: [in] The executor to use for the execution of the parallel algorithm the returned execution policy is used with.
-
template<typename ...
Parameters_
, typenameParametersType
= typename executor_parameters_join<Parameters_...>::type>
rebind_executor<sequenced_policy_shim, executor_type, ParametersType>::typewith
(Parameters_&&... params) const¶ Create a new sequenced_policy_shim from the given execution parameters
- Note
Requires: all parameters are executor_parameters, different parameter types can’t be duplicated
- Return
The new sequenced_policy_shim
- Template Parameters
Parameters
: The type of the executor parameters to associate with this execution policy.
- Parameters
params
: [in] The executor parameters to use for the execution of the parallel algorithm the returned execution policy is used with.
-
Executor &
executor
()¶ Return the associated executor object.
-
constexpr Executor const &
executor
() const¶ Return the associated executor object.
-
Parameters &
parameters
()¶ Return the associated executor parameters object.
-
constexpr Parameters const &
parameters
() const¶ Return the associated executor parameters object.
-
template<typename
Executor_
, typenameParameters_
>
structrebind
¶ - #include <execution_policy.hpp>
Rebind the type of executor used by this execution policy. The execution category of Executor shall not be weaker than that of this execution policy
Public Types
-
template<>
typedef sequenced_policy_shim<Executor_, Parameters_>type
¶ The type of the rebound execution policy.
-
template<>
-
typedef Executor
-
struct
sequenced_task_policy
¶ - #include <execution_policy.hpp>
Extension: The class sequenced_task_policy is an execution policy type used as a unique type to disambiguate parallel algorithm overloading and indicate that a parallel algorithm’s execution may not be parallelized (has to run sequentially).
The algorithm returns a future representing the result of the corresponding algorithm when invoked with the sequenced_policy.
Subclassed by hpx::parallel::execution::sequenced_task_policy_shim< Executor, Parameters >
Public Types
-
typedef sequenced_executor
executor_type
¶ The type of the executor associated with this execution policy.
-
typedef execution::extract_executor_parameters<executor_type>::type
executor_parameters_type
¶ The type of the associated executor parameters object which is associated with this execution policy
-
typedef sequenced_execution_tag
execution_category
¶ The category of the execution agents created by this execution policy.
Public Functions
-
constexpr sequenced_task_policy
operator()
(task_policy_tag) const¶ Create a new sequenced_task_policy from itself
- Return
The new sequenced_task_policy
- Parameters
tag
: [in] Specify that the corresponding asynchronous execution policy should be used
-
template<typename
Executor
>
rebind_executor<sequenced_task_policy, Executor, executor_parameters_type>::typeon
(Executor &&exec) const¶ Create a new sequenced_task_policy from the given executor
- Note
Requires: is_executor<Executor>::value is true
- Return
The new sequenced_task_policy
- Template Parameters
Executor
: The type of the executor to associate with this execution policy.
- Parameters
exec
: [in] The executor to use for the execution of the parallel algorithm the returned execution policy is used with.
-
template<typename ...
Parameters
, typenameParametersType
= typename executor_parameters_join<Parameters...>::type>
rebind_executor<sequenced_task_policy, executor_type, ParametersType>::typewith
(Parameters&&... params) const¶ Create a new sequenced_task_policy from the given execution parameters
- Note
Requires: all parameters are executor_parameters, different parameter types can’t be duplicated
- Return
The new sequenced_task_policy
- Template Parameters
Parameters
: The type of the executor parameters to associate with this execution policy.
- Parameters
params
: [in] The executor parameters to use for the execution of the parallel algorithm the returned execution policy is used with.
-
executor_type &
executor
()¶ Return the associated executor object.
-
constexpr executor_type const &
executor
() const¶ Return the associated executor object.
-
executor_parameters_type &
parameters
()¶ Return the associated executor parameters object.
-
constexpr executor_parameters_type const &
parameters
() const¶ Return the associated executor parameters object.
Private Functions
Friends
-
friend
hpx::parallel::execution::hpx::serialization::access
-
template<typename
Executor_
, typenameParameters_
>
structrebind
¶ - #include <execution_policy.hpp>
Rebind the type of executor used by this execution policy. The execution category of Executor shall not be weaker than that of this execution policy
Public Types
-
typedef sequenced_task_policy_shim<Executor_, Parameters_>
type
¶ The type of the rebound execution policy.
-
typedef sequenced_task_policy_shim<Executor_, Parameters_>
-
typedef sequenced_executor
-
template<typename
Executor
, typenameParameters
>
structsequenced_task_policy_shim
: public hpx::parallel::execution::sequenced_task_policy¶ - #include <execution_policy.hpp>
Extension: The class sequenced_task_policy_shim is an execution policy type used as a unique type to disambiguate parallel algorithm overloading based on combining a underlying sequenced_task_policy and an executor and indicate that a parallel algorithm’s execution may not be parallelized (has to run sequentially).
The algorithm returns a future representing the result of the corresponding algorithm when invoked with the sequenced_policy.
Public Types
-
typedef Executor
executor_type
¶ The type of the executor associated with this execution policy.
-
typedef Parameters
executor_parameters_type
¶ The type of the associated executor parameters object which is associated with this execution policy
-
typedef hpx::traits::executor_execution_category<executor_type>::type
execution_category
¶ The category of the execution agents created by this execution policy.
Public Functions
-
constexpr sequenced_task_policy_shim const &
operator()
(task_policy_tag tag) const¶ Create a new sequenced_task_policy from itself
- Return
The new sequenced_task_policy
- Parameters
tag
: [in] Specify that the corresponding asynchronous execution policy should be used
-
template<typename
Executor_
>
rebind_executor<sequenced_task_policy_shim, Executor_, executor_parameters_type>::typeon
(Executor_ &&exec) const¶ Create a new sequenced_task_policy from the given executor
- Note
Requires: is_executor<Executor>::value is true
- Return
The new sequenced_task_policy
- Template Parameters
Executor
: The type of the executor to associate with this execution policy.
- Parameters
exec
: [in] The executor to use for the execution of the parallel algorithm the returned execution policy is used with.
-
template<typename ...
Parameters_
, typenameParametersType
= typename executor_parameters_join<Parameters_...>::type>
rebind_executor<sequenced_task_policy_shim, executor_type, ParametersType>::typewith
(Parameters_&&... params) const¶ Create a new sequenced_task_policy_shim from the given execution parameters
- Note
Requires: all parameters are executor_parameters, different parameter types can’t be duplicated
- Return
The new sequenced_task_policy_shim
- Template Parameters
Parameters
: The type of the executor parameters to associate with this execution policy.
- Parameters
params
: [in] The executor parameters to use for the execution of the parallel algorithm the returned execution policy is used with.
-
Executor &
executor
()¶ Return the associated executor object.
-
constexpr Executor const &
executor
() const¶ Return the associated executor object.
-
Parameters &
parameters
()¶ Return the associated executor parameters object.
-
constexpr Parameters const &
parameters
() const¶ Return the associated executor parameters object.
-
template<typename
Executor_
, typenameParameters_
>
structrebind
¶ - #include <execution_policy.hpp>
Rebind the type of executor used by this execution policy. The execution category of Executor shall not be weaker than that of this execution policy
Public Types
-
template<>
typedef sequenced_task_policy_shim<Executor_, Parameters_>type
¶ The type of the rebound execution policy.
-
template<>
-
typedef Executor
-
constexpr task_policy_tag
-
namespace
-
namespace
Header hpx/executors/execution_policy_fwd.hpp
¶
Header hpx/executors/guided_pool_executor.hpp
¶
Defines
-
GUIDED_POOL_EXECUTOR_DEBUG
¶
-
namespace
hpx
Functions
-
static hpx::debug::enable_print<GUIDED_POOL_EXECUTOR_DEBUG> hpx::gpx_deb("GP_EXEC")
-
namespace
parallel
-
namespace
execution
-
template<typename
Hint
>
structexecutor_execution_category
<guided_pool_executor<Hint>>¶ - #include <guided_pool_executor.hpp>
Public Types
-
typedef parallel::execution::parallel_execution_tag
type
-
typedef parallel::execution::parallel_execution_tag
-
template<typename
Hint
>
structexecutor_execution_category
<guided_pool_executor_shim<Hint>>¶ - #include <guided_pool_executor.hpp>
Public Types
-
typedef parallel::execution::parallel_execution_tag
type
-
typedef parallel::execution::parallel_execution_tag
-
template<typename
Tag
>
structguided_pool_executor
<pool_numa_hint<Tag>>¶ - #include <guided_pool_executor.hpp>
Public Functions
-
guided_pool_executor
(threads::thread_pool_base *pool, bool hp_sync = false)¶
-
guided_pool_executor
(threads::thread_pool_base *pool, threads::thread_stacksize stacksize, bool hp_sync = false)¶
-
guided_pool_executor
(threads::thread_pool_base *pool, threads::thread_priority priority, threads::thread_stacksize stacksize = threads::thread_stacksize_default, bool hp_sync = false)¶
-
template<typename
F
, typename ...Ts
>
future<typename hpx::util::detail::invoke_deferred_result<F, Ts...>::type>async_execute
(F &&f, Ts&&... ts)¶
-
template<typename
F
, typenameFuture
, typename ...Ts
, typename = detail::enable_if_t<hpx::traits::is_future<Future>::value>>
autothen_execute
(F &&f, Future &&predecessor, Ts&&... ts)¶
-
template<typename
F
, template<typename> classOuterFuture
, typename ...InnerFutures
, typename ...Ts
, typename = detail::enable_if_t<detail::is_future_of_tuple_of_futures<OuterFuture<hpx::util::tuple<InnerFutures...>>>::value>, typename = detail::enable_if_t<hpx::traits::is_future_tuple<hpx::util::tuple<InnerFutures...>>::value>>
autothen_execute
(F &&f, OuterFuture<hpx::util::tuple<InnerFutures...>> &&predecessor, Ts&&... ts)¶
-
template<typename
F
, typename ...InnerFutures
, typename = detail::enable_if_t<hpx::traits::is_future_tuple<hpx::util::tuple<InnerFutures...>>::value>>
autoasync_execute
(F &&f, hpx::util::tuple<InnerFutures...> &&predecessor)¶
Private Members
-
threads::thread_pool_base *
pool_
¶
-
threads::thread_priority
priority_
¶
-
threads::thread_stacksize
stacksize_
¶
-
pool_numa_hint<Tag>
hint_
¶
-
bool
hp_sync_
¶
Friends
-
friend
hpx::parallel::execution::guided_pool_executor_shim
-
-
template<typename
H
>
structguided_pool_executor_shim
¶ - #include <guided_pool_executor.hpp>
Public Functions
-
guided_pool_executor_shim
(bool guided, threads::thread_pool_base *pool, bool hp_sync = false)¶
-
guided_pool_executor_shim
(bool guided, threads::thread_pool_base *pool, threads::thread_stacksize stacksize, bool hp_sync = false)¶
-
guided_pool_executor_shim
(bool guided, threads::thread_pool_base *pool, threads::thread_priority priority, threads::thread_stacksize stacksize = threads::thread_stacksize_default, bool hp_sync = false)¶
-
-
template<typename
-
namespace
-
Header hpx/executors/limiting_executor.hpp
¶
-
namespace
hpx
-
namespace
execution
¶ -
namespace
experimental
¶ -
Functions
-
static constexpr print_on hpx::execution::experimental::lim_debug("LIMEXEC")
-
template<typename
BaseExecutor
>
structlimiting_executor
¶ - #include <limiting_executor.hpp>
Public Types
-
template<>
usingexecution_category
= typename BaseExecutor::execution_category¶
-
template<>
usingexecutor_parameters_type
= typename BaseExecutor::executor_parameters_type¶
Public Functions
-
limiting_executor
(BaseExecutor &ex, std::size_t lower, std::size_t upper, bool block_on_destruction = true)¶
-
~limiting_executor
()¶
-
limiting_executor const &
context
() const¶
-
template<typename
F
, typenameFuture
, typename ...Ts
>
decltype(auto)then_execute
(F &&f, Future &&predecessor, Ts&&... ts)¶
-
template<typename
F
, typenameS
, typename ...Ts
>
decltype(auto)bulk_async_execute
(F &&f, S const &shape, Ts&&... ts)¶
-
template<typename
F
, typenameS
, typenameFuture
, typename ...Ts
>
decltype(auto)bulk_then_execute
(F &&f, S const &shape, Future &&predecessor, Ts&&... ts)¶
-
void
wait
()¶
-
void
wait_all
()¶
-
struct
on_exit
¶ - #include <limiting_executor.hpp>
Public Members
-
template<>
limiting_executor const &executor_
¶
-
template<>
-
template<typename
F
, typenameB
= BaseExecutor, typenameEnable
= void>
structthrottling_wrapper
¶ - #include <limiting_executor.hpp>
-
template<>
-
-
namespace
-
namespace
Header hpx/executors/parallel_executor.hpp
¶
-
namespace
hpx
-
namespace
parallel
-
namespace
execution
-
-
template<typename
Policy
>
structparallel_policy_executor
¶ - #include <parallel_executor.hpp>
A parallel_executor creates groups of parallel execution agents which execute in threads implicitly created by the executor. This executor prefers continuing with the creating thread first before executing newly created threads.
This executor conforms to the concepts of a TwoWayExecutor, and a BulkTwoWayExecutor
Public Types
-
typedef parallel_execution_tag
execution_category
¶ Associate the parallel_execution_tag executor tag type as a default with this executor.
-
typedef static_chunk_size
executor_parameters_type
¶ Associate the static_chunk_size executor parameters type as a default with this executor.
Public Functions
-
constexpr
parallel_policy_executor
(threads::thread_priority priority = threads::thread_priority_default, threads::thread_stacksize stacksize = threads::thread_stacksize_default, threads::thread_schedule_hint schedulehint = {}, Policy l = detail::get_default_policy<Policy>::call(), std::size_t spread = 4, std::size_t tasks = std::size_t(-1))¶ Create a new parallel executor.
-
constexpr
parallel_policy_executor
(threads::thread_stacksize stacksize, threads::thread_schedule_hint schedulehint = {}, Policy l = detail::get_default_policy<Policy>::call(), std::size_t spread = 4, std::size_t tasks = std::size_t(-1))¶
-
typedef parallel_execution_tag
-
template<typename
-
namespace
-
namespace
Header hpx/executors/parallel_executor_aggregated.hpp
¶
-
template<>
structparallel_policy_executor_aggregated
<hpx::launch>¶ - #include <parallel_executor_aggregated.hpp>
Public Types
-
template<>
usingexecution_category
= parallel_execution_tag¶ Associate the parallel_execution_tag executor tag type as a default with this executor.
-
template<>
usingexecutor_parameters_type
= static_chunk_size¶ Associate the static_chunk_size executor parameters type as a default with this executor.
-
template<>
-
namespace
hpx
-
namespace
parallel
-
namespace
execution
Typedefs
-
template<typename
Policy
= hpx::launch::async_policy>
structparallel_policy_executor_aggregated
¶ - #include <parallel_executor_aggregated.hpp>
A parallel_executor_aggregated creates groups of parallel execution agents that execute in threads implicitly created by the executor. This executor prefers continuing with the creating thread first before executing newly created threads.
This executor conforms to the concepts of a TwoWayExecutor, and a BulkTwoWayExecutor
Public Types
-
template<>
usingexecution_category
= parallel_execution_tag¶ Associate the parallel_execution_tag executor tag type as a default with this executor.
-
template<>
usingexecutor_parameters_type
= static_chunk_size¶ Associate the static_chunk_size executor parameters type as a default with this executor.
-
template<>
-
template<>
structparallel_policy_executor_aggregated
<hpx::launch> - #include <parallel_executor_aggregated.hpp>
Public Types
-
template<>
usingexecution_category
= parallel_execution_tag Associate the parallel_execution_tag executor tag type as a default with this executor.
-
template<>
usingexecutor_parameters_type
= static_chunk_size Associate the static_chunk_size executor parameters type as a default with this executor.
-
template<>
-
template<typename
-
namespace
-
namespace
Header hpx/executors/restricted_thread_pool_executor.hpp
¶
-
namespace
hpx
-
namespace
parallel
-
namespace
execution
-
class
restricted_thread_pool_executor
¶ - #include <restricted_thread_pool_executor.hpp>
Public Types
-
typedef parallel_execution_tag
execution_category
¶ Associate the parallel_execution_tag executor tag type as a default with this executor.
-
typedef static_chunk_size
executor_parameters_type
¶ Associate the static_chunk_size executor parameters type as a default with this executor.
Public Functions
-
restricted_thread_pool_executor
(std::size_t first_thread = 0, std::size_t num_threads = 1, threads::thread_priority priority = threads::thread_priority_default, threads::thread_stacksize stacksize = threads::thread_stacksize_default, threads::thread_schedule_hint schedulehint = {}, std::size_t hierarchical_threshold = hierarchical_threshold_default_)¶ Create a new parallel executor.
-
restricted_thread_pool_executor
(restricted_thread_pool_executor const &other)¶
Private Members
-
threads::thread_pool_base *
pool_
= nullptr¶
-
threads::thread_priority
priority_
= threads::thread_priority_default¶
-
threads::thread_stacksize
stacksize_
= threads::thread_stacksize_default¶
-
threads::thread_schedule_hint
schedulehint_
= {}¶
-
std::size_t
hierarchical_threshold_
= hierarchical_threshold_default_¶
-
typedef parallel_execution_tag
-
class
-
namespace
-
namespace
Header hpx/executors/sequenced_executor.hpp
¶
-
namespace
hpx
-
namespace
parallel
-
namespace
execution
-
struct
sequenced_executor
¶ - #include <sequenced_executor.hpp>
A sequential_executor creates groups of sequential execution agents which execute in the calling thread. The sequential order is given by the lexicographical order of indices in the index space.
-
struct
-
namespace
-
namespace
Header hpx/executors/service_executors.hpp
¶
Header hpx/executors/sync.hpp
¶
Header hpx/executors/thread_pool_attached_executors.hpp
¶
Header hpx/executors/thread_pool_executor.hpp
¶
-
namespace
hpx
-
namespace
parallel
-
namespace
execution
-
class
thread_pool_executor
¶ - #include <thread_pool_executor.hpp>
A thread_pool_executor creates groups of parallel execution agents which execute in threads implicitly created by the executor. This executor prefers continuing with the creating thread first before executing newly created threads.
This executor conforms to the concepts of a TwoWayExecutor, and a BulkTwoWayExecutor
Public Types
-
typedef parallel_execution_tag
execution_category
¶ Associate the parallel_execution_tag executor tag type as a default with this executor.
-
typedef static_chunk_size
executor_parameters_type
¶ Associate the static_chunk_size executor parameters type as a default with this executor.
Public Functions
-
thread_pool_executor
(threads::thread_priority priority = threads::thread_priority_default, threads::thread_stacksize stacksize = threads::thread_stacksize_default, threads::thread_schedule_hint schedulehint = {}, std::size_t hierarchical_threshold = hierarchical_threshold_default_)¶ Create a new parallel executor.
-
thread_pool_executor
(threads::policies::scheduler_base *scheduler, threads::thread_priority priority = threads::thread_priority_default, threads::thread_stacksize stacksize = threads::thread_stacksize_default, threads::thread_schedule_hint schedulehint = {}, std::size_t hierarchical_threshold = hierarchical_threshold_default_)¶
-
thread_pool_executor
(threads::thread_pool_base *pool, threads::thread_priority priority = threads::thread_priority_default, threads::thread_stacksize stacksize = threads::thread_stacksize_default, threads::thread_schedule_hint schedulehint = {}, std::size_t hierarchical_threshold = hierarchical_threshold_default_)¶
Private Members
-
threads::thread_pool_base *
pool_
= nullptr¶
-
threads::thread_priority
priority_
= threads::thread_priority_default¶
-
threads::thread_stacksize
stacksize_
= threads::thread_stacksize_default¶
-
threads::thread_schedule_hint
schedulehint_
= {}¶
-
std::size_t
hierarchical_threshold_
= hierarchical_threshold_default_¶
-
typedef parallel_execution_tag
-
class
-
namespace
-
namespace