Skip to content

Commit

Permalink
Merge pull request #2097 from STEllAR-GROUP/reduce_by_key
Browse files Browse the repository at this point in the history
Reduce by key, extends #1141
  • Loading branch information
hkaiser committed Apr 22, 2016
2 parents a86ced1 + c14c97b commit 82bb1c2
Show file tree
Hide file tree
Showing 7 changed files with 895 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/CMakeLists.txt
Expand Up @@ -84,6 +84,7 @@ set(doxygen_dependencies
"${PROJECT_SOURCE_DIR}/hpx/parallel/algorithms/mismatch.hpp"
"${PROJECT_SOURCE_DIR}/hpx/parallel/algorithms/move.hpp"
"${PROJECT_SOURCE_DIR}/hpx/parallel/algorithms/reduce.hpp"
"${PROJECT_SOURCE_DIR}/hpx/parallel/algorithms/reduce_by_key.hpp"
"${PROJECT_SOURCE_DIR}/hpx/parallel/algorithms/remove_copy.hpp"
"${PROJECT_SOURCE_DIR}/hpx/parallel/algorithms/replace.hpp"
"${PROJECT_SOURCE_DIR}/hpx/parallel/algorithms/reverse.hpp"
Expand Down
3 changes: 3 additions & 0 deletions docs/hpx.idx
Expand Up @@ -228,6 +228,9 @@ parallel::move "move" "hpx\.parallel\.v1\.move$"
# hpx/parallel/algorithms/reduce.hpp
parallel::reduce "reduce" "hpx\.parallel\.v1\.reduce.*"

# hpx/parallel/algorithms/reduce_by_key.hpp
parallel::reduce_by_key "reduce_by_key" "hpx\.parallel\.v1\.reduce_by_key.*"

# hpx/parallel/algorithms/for_loop_reduction.hpp
parallel::reduction "reduction" "hpx\.parallel\.v2\.reduction"
parallel::reduction_plus "reduction_plus" "hpx\.parallel\.v2\.reduction_plus"
Expand Down
5 changes: 5 additions & 0 deletions docs/manual/parallel_algorithms.qbk
Expand Up @@ -314,6 +314,11 @@ __hpx__ provides implementations of the following parallel algorithms:
[[ [algoref reduce] ]
[Sums up a range of elements.]
[`<hpx/include/parallel_reduce.hpp>`]]
[[ [algoref reduce_by_key] ]
[Performs an inclusive scan on consecutive elements with matching keys, with a reduction
to output only the final sum for each key. The key sequence {1,1,1,2,3,3,3,3,1} and value
sequence {2,3,4,5,6,7,8,9,10} would be reduced to keys={1,2,3,1}, values={9,5,30,10}]
[`<hpx/include/parallel_reduce.hpp>`]]
[[ [algoref transform_reduce] ]
[Sums up a range of elements after applying a function.]
[`<hpx/include/parallel_transform_reduce.hpp>`]]
Expand Down
1 change: 1 addition & 0 deletions hpx/include/parallel_reduce.hpp
Expand Up @@ -8,6 +8,7 @@
#define HPX_PARALLEL_REDUCE_JUN_28_2014_0827AM

#include <hpx/parallel/algorithms/reduce.hpp>
#include <hpx/parallel/algorithms/reduce_by_key.hpp>

#endif

0 comments on commit 82bb1c2

Please sign in to comment.