hpx/execution/executors/rebind_policy.hpp#
Defined in header hpx/execution/executors/rebind_policy.hpp.
See Public API for a list of names and headers that are part of the public HPX API.
rebind_executor and the customization points for rebinding an execution policy’s executor and executor parameters independently of one another.
rebind_executor_t rebinds both at once and requires the policy to be shaped as Derived<Executor, Parameters>. rebind_policy_executor and rebind_policy_parameters can be specialized per axis, so a policy that carries extra state or has a different shape can still be rebound. Their defaults forward to rebind_executor_t. The matching construction-side customization points are in create_rebound_policy.hpp.
-
namespace hpx
-
namespace execution
-
namespace experimental
Typedefs
-
template<typename ExPolicy, typename Executor, typename Parameters>
using rebind_executor_t = typename rebind_executor<ExPolicy, Executor, Parameters>::type#
-
template<typename Policy, typename Executor>
using rebind_policy_executor_t = hpx::execution::detail::validated_rebind_policy_executor<std::decay_t<Policy>, std::decay_t<Executor>>::type# Policy rebound to Executor, keeping its executor parameters.
Applies rebind_policy_executor and checks that Executor’s execution category is not weaker than Policy’s, also for direct specializations of rebind_policy_executor. If the check fails, or rebind_policy_executor has no nested
type, the alias does not name a type.
-
template<typename Policy, typename Parameters>
using rebind_policy_parameters_t = hpx::execution::detail::validated_rebind_policy_parameters<std::decay_t<Policy>, std::decay_t<Parameters>>::type# Policy rebound to Parameters, keeping its executor.
Applies rebind_policy_parameters and checks that the execution category of Policy’s current executor is not weaker than Policy’s, also for direct specializations of rebind_policy_parameters. If the check fails, or rebind_policy_parameters has no nested
type, the alias does not name a type.
Variables
- template<typename Policy, typename Executor, typename Parameters> concept rebind_policy_order_independent = std::is_same_v< rebind_policy_parameters_t<rebind_policy_executor_t<Policy, Executor>,Parameters>,rebind_policy_executor_t<rebind_policy_parameters_t<Policy, Parameters>,Executor>>
Whether rebinding the executor then the parameters gives the same type as the other order.
Not satisfied if either order can’t be rebound, so it can be used in a constraint without failing to compile. Satisfied for the defaults whenever both orders can be rebound. A policy that specializes either customization point should static_assert it.
-
template<typename Policy, typename Executor, typename Parameters>
constexpr bool rebind_policy_order_independent_v = rebind_policy_order_independent<Policy, Executor, Parameters># Value of rebind_policy_order_independent.
-
template<typename ExPolicy, typename Executor, typename Parameters>
struct rebind_executor# - #include <rebind_policy.hpp>
Rebind the type of executor used by an execution policy. The execution category of Executor shall not be weaker than that of ExecutionPolicy.
Public Types
-
using type = typename policy_type::template rebind<executor_type, parameters_type>::type#
The type of the rebound execution policy.
-
using type = typename policy_type::template rebind<executor_type, parameters_type>::type#
-
template<typename Policy, typename Executor>
struct rebind_policy_executor : public hpx::execution::detail::default_rebind_policy_executor<std::decay_t<Policy>, std::decay_t<Executor>># - #include <rebind_policy.hpp>
Customization point for rebinding an execution policy to a new executor, keeping its executor parameters.
The default needs a nested
rebind<Executor_, Parameters_>::type, as hpx::execution::detail::execution_policy provides, and has no nestedtypeotherwise. Specialize it for policies that don’t fit that shape. Use it through rebind_policy_executor_t, which also checks that Executor’s execution category is not weaker than Policy’s.A specialization that can’t rebind Policy to a given Executor should leave out the nested
typeinstead of failing to compile, so that rebind_policy_executor_t, create_rebound_policy_executor and rebind_policy_order_independent_v can detect it.- Template Parameters:
Policy – The execution policy type being rebound.
Executor – The executor type Policy should be rebound to.
-
template<typename Policy, typename Parameters>
struct rebind_policy_parameters : public hpx::execution::detail::default_rebind_policy_parameters<std::decay_t<Policy>, std::decay_t<Parameters>># - #include <rebind_policy.hpp>
Customization point for rebinding an execution policy to new executor parameters, keeping its executor.
The default needs a nested
executor_typeandrebind<Executor_, Parameters_>::type, and has no nestedtypeotherwise. Specialize it for policies that don’t fit that shape. Use it through rebind_policy_parameters_t.A specialization that can’t rebind Policy to given Parameters should leave out the nested
typeinstead of failing to compile, so that rebind_policy_parameters_t, create_rebound_policy_parameters and rebind_policy_order_independent_v can detect it.- Template Parameters:
Policy – The execution policy type being rebound.
Parameters – The executor parameters type Policy should be rebound to.
-
template<typename ExPolicy, typename Executor, typename Parameters>
-
namespace experimental
-
namespace execution