Skip to content

Commit

Permalink
update sphinx docs and replace old deprecated calls for transform_inc…
Browse files Browse the repository at this point in the history
…lusive_scan
  • Loading branch information
Jedi18 committed Jul 13, 2021
1 parent 6d0c04a commit 97a563c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
4 changes: 3 additions & 1 deletion docs/sphinx/api/public_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,11 @@ Functions
- :cpp:func:`hpx::parallel::v1::inclusive_scan`
- :cpp:func:`hpx::reduce`
- :cpp:func:`hpx::parallel::v1::transform_exclusive_scan`
- :cpp:func:`hpx::parallel::v1::transform_inclusive_scan`
- :cpp:func:`hpx::transform_inclusive_scan`
- :cpp:func:`hpx::transform_reduce`

- :cpp:func:`hpx::ranges::transform_inclusive_scan`

Header ``hpx/optional.hpp``
===========================

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ Parallel algorithms
* Sums up a range of elements after applying a function. Also, accumulates the inner products of two input ranges.
* ``<hpx/numeric.hpp>``
* :cppreference-algorithm:`transform_reduce`
* * :cpp:func:`hpx::parallel::v1::transform_inclusive_scan`
* * :cpp:func:`hpx::transform_inclusive_scan`
* Does an inclusive parallel scan over a range of elements after applying a function.
* ``<hpx/numeric.hpp>``
* :cppreference-algorithm:`transform_inclusive_scan`
Expand Down
1 change: 0 additions & 1 deletion libs/full/include_local/include/hpx/local/numeric.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ namespace hpx {
using hpx::parallel::exclusive_scan;
using hpx::parallel::inclusive_scan;
using hpx::parallel::transform_exclusive_scan;
using hpx::parallel::transform_inclusive_scan;
} // namespace hpx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void test_zero()
d.begin(), 100, [](int bar, int baz) { return bar + baz; });
Iter i_exc_mult = hpx::parallel::exclusive_scan(policy, a.begin(), a.end(),
e.begin(), 10, [](int bar, int baz) { return bar * baz; });
Iter i_transform_inc = hpx::parallel::transform_inclusive_scan(
Iter i_transform_inc = hpx::transform_inclusive_scan(
policy, a.begin(), a.end(), f.begin(),
[](int bar, int baz) { return 2 * bar + 2 * baz; },
[](int foo) { return foo - 3; }, 10);
Expand Down Expand Up @@ -71,7 +71,7 @@ void test_async_zero()
a.end(), d.begin(), 100, [](int bar, int baz) { return bar + baz; });
Fut_Iter f_exc_mult = hpx::parallel::exclusive_scan(policy, a.begin(),
a.end(), e.begin(), 10, [](int bar, int baz) { return bar * baz; });
Fut_Iter f_transform_inc = hpx::parallel::transform_inclusive_scan(
Fut_Iter f_transform_inc = hpx::transform_inclusive_scan(
policy, a.begin(), a.end(), f.begin(),
[](int bar, int baz) { return 2 * bar + 2 * baz; },
[](int foo) { return foo - 3; }, 10);
Expand Down Expand Up @@ -109,7 +109,7 @@ void test_one(std::vector<int> a)
policy, a.begin(), a.end(), d.begin(), 10, fun_add);
Iter f_exc_mult = hpx::parallel::exclusive_scan(
policy, a.begin(), a.end(), e.begin(), 10, fun_mult);
Iter f_transform_inc = hpx::parallel::transform_inclusive_scan(
Iter f_transform_inc = hpx::transform_inclusive_scan(
policy, a.begin(), a.end(), f.begin(), fun_add, fun_conv, 10);
Iter f_transform_exc = hpx::parallel::transform_exclusive_scan(
policy, a.begin(), a.end(), g.begin(), 10, fun_add, fun_conv);
Expand Down Expand Up @@ -166,7 +166,7 @@ void test_async_one(std::vector<int> a)
policy, a.begin(), a.end(), d.begin(), 10, fun_add);
Fut_Iter f_exc_mult = hpx::parallel::exclusive_scan(
policy, a.begin(), a.end(), e.begin(), 10, fun_mult);
Fut_Iter f_transform_inc = hpx::parallel::transform_inclusive_scan(
Fut_Iter f_transform_inc = hpx::transform_inclusive_scan(
policy, a.begin(), a.end(), f.begin(), fun_add, fun_conv, 10);
Fut_Iter f_transform_exc = hpx::parallel::transform_exclusive_scan(
policy, a.begin(), a.end(), g.begin(), 10, fun_add, fun_conv);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int hpx_main()
std::vector<int> test{1, 10, 100, 1000};
std::vector<Integer> output(test.size());

hpx::parallel::transform_inclusive_scan(
hpx::transform_inclusive_scan(
hpx::execution::par, test.cbegin(), test.cend(), output.begin(),
[](Integer acc, Integer xs) -> Integer {
return Integer{acc.integer + xs.integer};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ int hpx_main()
Elem{1, true}, Elem{3, false}, Elem{2, true}, Elem{4, false}};
std::vector<Elem> output(test.size());

hpx::parallel::transform_inclusive_scan(
hpx::transform_inclusive_scan(
hpx::execution::par, test.cbegin(), test.cend(), output.begin(),
[](Elem left, Elem right) -> Elem {
if (right.begin)
Expand Down

0 comments on commit 97a563c

Please sign in to comment.