Template Function shad::impl::local_map_init

Function Documentation

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

applies the map pattern over a local range

Applies an operation in parallel to each partition of a local range and returns the collection of mapped values (one for each partition).

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
Parameters
  • firstlast: the input range
  • map_kernel: the operation function object that will be applied
  • init: the initial mapped value