![]() |
hpx::lcos::reduce — 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,...))> reduce(std::vector< hpx::id_type > const & ids, ReduceOp && reduce_op, ArgN argN, ...);
The function hpx::lcos::reduce performs a distributed reduction operation over results returned from action invocations on a given set of global identifiers. The action can be either a 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.
Parameters: |
|
||||||
Returns: |
This function returns a future representing the result of the overall reduction operation. |