Template Function shad::impl::local_map_init¶
- Defined in File impl_patterns.h
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 rangeMapF: the type of the operation function object
- Parameters
firstlast: the input rangemap_kernel: the operation function object that will be appliedinit: the initial mapped value