![]() |
hpx::lcos::inverse_fold_with_index — Perform a distributed inverse folding operation.
// In header: <hpx/lcos/fold.hpp> template<typename Action, typename FoldOp, typename Init, typename ArgN, ... > hpx::future< decltype(Action(hpx::id_type, ArgN,..., std::size_t))> inverse_fold_with_index(std::vector< hpx::id_type > const & ids, FoldOp && fold_op, Init && init, ArgN argN, ...);
The function hpx::lcos::inverse_fold_with_index performs an inverse distributed folding 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.
![]() |
Note |
---|---|
The type of the initial value must be convertible to the result type returned from the invoked action. |
Parameters: |
|
||||||||
Returns: |
This function returns a future representing the result of the overall folding operation. |