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