Template Function shad::impl::distributed_folding_map¶
- Defined in File impl_patterns.h
Function Documentation¶
-
template <typename ForwardIt, typename MapF, typename S, typename... Args>
Sshad::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 rangeMapF: the type of the operation function objectS: the type of the solutionArgs: the type of operation’s arguments
- Parameters
firstlast: the input rangemap_kernel: the operation function object that will be appliedinit_sol: the initial solutionargs: operation’s arguments