![]() |
hpx::lcos::reduce_with_index — Perform a distributed reduction operation.
// In header: <hpx/lcos/reduce.hpp> template<typename Action, typename ReduceOp, typename ArgN, ... > hpx::future< decltype(Action(hpx::id_type, ArgN,..., std::size_t))> reduce_with_index(std::vector< hpx::id_type > const & ids, ReduceOp && reduce_op, ArgN argN, ...);
The function hpx::lcos::reduce_with_index performs a distributed reduction operation over results returned from action invocations on a given set of global identifiers. The action can be either plain action (in which case the global identifiers have to refer to localities) or a component action (in which case the global identifiers have to refer to instances of a component type which exposes the action.
The function passes the index of the global identifier in the given list of identifiers as the last argument to the action.
Parameters: |
|
||||||
Returns: |
This function returns a future representing the result of the overall reduction operation. |