Template Function shad::impl::distributed_map_init

Function Documentation

template <typename ForwardIt, typename MapF, typename... Args>
std::vector<typename std::result_of<MapF&(ForwardIt, ForwardIt, Args&&...)>::type> shad::impl::distributed_map_init(ForwardIt first, ForwardIt last, MapF &&map_kernel, const typename std::result_of<MapF&(ForwardIt, ForwardIt, Args&&...)>::type &init, Args&&... args, )

applies the map pattern over a distributed range

Applies an operation in parallel to each sub-range (one for each locality on which the range is physically mapped) and returns the collection of mapped values (one for each sub-range).

Return
the collection of mapped values
Template Parameters
  • ForwardIt: the type of the iterators in the input range
  • MapF: the type of the operation function object
  • Args: the type of operation’s arguments
Parameters
  • firstlast: the input range
  • map_kernel: the operation function object that will be applied
  • init: the initial mapped value
  • args: operation’s arguments