Suppose we have a vector of futures of type T and we want to reduce the values
contained in the futures using T op(T, T), with initial value of init. What is
the HPX recommended way of doing this? What should the implementation of
"future<T> myreduce(vector<future<T> > fs, T init, Op op)" be?
hpx::parallel::reduce can't be used with a vector of futures. hpx::lcos::reduce
isn't what we're looking for as this isn't a distributed operation. One option
is to use hpx::when_any and accumulate the values as they are ready. But this
serializes the accumulation of the futures, which may not be desirable.
Daniel
_______________________________________________
hpx-users mailing list
[email protected]
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users