Open martinjrobins opened 7 years ago
What is the best parallel algorithm for sum of distributed vector? My first thought was a divide-and-conquer approach, using recursion. i.e
sum(1:n) - > sum(1:n/2) + sum(n/2:n) -> sum(1:n/4) + sum(n/4:n/2) + sun(n/2:3n/4) + sum(3n/4:n)
You could build up this tree of relationships using chained hpx::future
objects and then rely on the library to execute the lot (this sort of thing seems to be hpx's selling point, that you don't have to explicitly schedule everything).
but parallel algorithms are pretty new for me. Is there a good textbook for this sort of thing?
See #1 for distributed vector