Template Function shad::impl::distributed_folding_map

Function Documentation

template <typename ForwardIt, typename MapF, typename S, typename... Args>
S shad::impl::distributed_folding_map(ForwardIt first, ForwardIt last, MapF &&map_kernel, const S &init_sol, Args&&... args)

applies the folding-map pattern over a distributed range

Applies an operation sequentially to each sub-range (one for each locality on which the range is physically mapped), forwarding the solution from portion i to portion i + 1.

Return
the last solution
Template Parameters
  • ForwardIt: the type of the iterators in the input range
  • MapF: the type of the operation function object
  • S: the type of the solution
  • Args: the type of operation’s arguments
Parameters
  • firstlast: the input range
  • map_kernel: the operation function object that will be applied
  • init_sol: the initial solution
  • args: operation’s arguments