hpx/execution/executors/rebind_policy.hpp

Contents

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.

Orthogonal customization points for rebinding an execution policy’s executor and executor parameters independently of one another.

hpx::execution::detail::execution_policy is the CRTP base class that CRTP-based built-in execution policies derive from; not every built-in policy uses it (thrust_task_policy is one example that does not). It exposes a single, combined rebind operation: given a new Executor and a new Parameters type, it produces Derived<Executor, Parameters>, where Derived is the template <typename, typename> class the concrete policy is written as. hpx::execution::experimental::rebind_executor_t builds on top of that combined operation and is what hpx::execution::detail::execution_policy itself uses internally for on(), with(), and query().

That combined operation requires every execution policy to be shaped exactly as Derived<Executor, Parameters>, which is awkward for a policy that needs to carry additional state, expose additional template parameters, or simply is not naturally expressed as a two-parameter class template. This header adds two smaller, independently specializable customization points, one per axis, so a policy can opt in to rebinding along either axis without being forced into that shape at all. This is purely additive: nothing here replaces or is called by the existing combined rebind_executor_t, on(), with(), or query() machinery.

namespace hpx
namespace execution