hpx/resiliency/async_replicate_executor.hpp#

Defined in header hpx/resiliency/async_replicate_executor.hpp.

See Public API for a list of names and headers that are part of the public HPX API.

namespace hpx
namespace resiliency
namespace experimental

Functions

template<typename Executor, typename Vote, typename Pred, typename F, typename ...Ts>
decltype(auto) hpx_invoke(async_replicate_vote_validate_t, Executor &&exec, std::size_t n, Vote &&vote, Pred &&pred, F &&f, Ts&&... ts)#

ADL hook for async_replicate_vote_validate CPO with executor.

Asynchronously launches f exactly n times on exec, validates results with pred, then runs valid results through vote.

Parameters
  • tag – CPO tag (async_replicate_vote_validate_t).

  • exec – Executor to run f on.

  • n – Number of replicated invocations.

  • vote – Voting function selecting among valid results.

  • pred – Predicate validating each invocation result.

  • f – Callable to invoke asynchronously.

  • ts – Arguments forwarded to f.

Returns

future with the voted-upon result.

template<typename Executor, typename Vote, typename F, typename ...Ts>
decltype(auto) hpx_invoke(async_replicate_vote_t, Executor &&exec, std::size_t n, Vote &&vote, F &&f, Ts&&... ts)#

ADL hook for async_replicate_vote CPO with executor.

Asynchronously launches f exactly n times on exec, runs valid results through vote. Validation uses the default exception check.

Parameters
  • tag – CPO tag (async_replicate_vote_t).

  • exec – Executor to run f on.

  • n – Number of replicated invocations.

  • vote – Voting function selecting among valid results.

  • f – Callable to invoke asynchronously.

  • ts – Arguments forwarded to f.

Returns

future with the voted-upon result.

template<typename Executor, typename Pred, typename F, typename ...Ts>
decltype(auto) hpx_invoke(async_replicate_validate_t, Executor &&exec, std::size_t n, Pred &&pred, F &&f, Ts&&... ts)#

ADL hook for async_replicate_validate CPO with executor.

Asynchronously launches f exactly n times on exec, validates results with pred. Returns the first valid result.

Parameters
  • tag – CPO tag (async_replicate_validate_t).

  • exec – Executor to run f on.

  • n – Number of replicated invocations.

  • pred – Predicate validating each invocation result.

  • f – Callable to invoke asynchronously.

  • ts – Arguments forwarded to f.

Returns

future with the first valid result.

template<typename Executor, typename F, typename ...Ts>
decltype(auto) hpx_invoke(async_replicate_t, Executor &&exec, std::size_t n, F &&f, Ts&&... ts)#

ADL hook for async_replicate CPO with executor.

Asynchronously launches f exactly n times on exec. Validates by checking for exceptions. Returns the first valid result.

Parameters
  • tag – CPO tag (async_replicate_t).

  • exec – Executor to run f on.

  • n – Number of replicated invocations.

  • f – Callable to invoke asynchronously.

  • ts – Arguments forwarded to f.

Returns

future with the first non-throwing result.