Skip to content

Commit

Permalink
adding par_unseq to find
Browse files Browse the repository at this point in the history
Signed-off-by: Hari Hara Naveen S <harihara.sn@gmail.com>
  • Loading branch information
Johan511 committed Jul 18, 2023
1 parent 7327cb1 commit ad84137
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libs/core/algorithms/include/hpx/parallel/util/loop.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ namespace hpx::parallel::util {

// Helper class to repeatedly call a function a given number of times
// starting from a given iterator position.
template <typename IterCat>
template <typename IterCat, typename Dummy = void>
struct loop_idx_n
{
///////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -859,8 +859,8 @@ namespace hpx::parallel::util {
}
};

template <>
struct loop_idx_n<std::random_access_iterator_tag>
template <typename ExPolicy>
struct loop_idx_n<std::random_access_iterator_tag, ExPolicy>
{
///////////////////////////////////////////////////////////////////
// handle sequences of non-futures
Expand Down Expand Up @@ -928,7 +928,7 @@ namespace hpx::parallel::util {
std::size_t base_idx, Iter it, std::size_t count, F&& f)
{
using cat = typename std::iterator_traits<Iter>::iterator_category;
return detail::loop_idx_n<cat>::call(
return detail::loop_idx_n<cat, ExPolicy>::call(
base_idx, it, count, HPX_FORWARD(F, f));
}

Expand All @@ -939,7 +939,7 @@ namespace hpx::parallel::util {
F&& f)
{
using cat = typename std::iterator_traits<Iter>::iterator_category;
return detail::loop_idx_n<cat>::call(
return detail::loop_idx_n<cat, ExPolicy>::call(
base_idx, it, count, tok, HPX_FORWARD(F, f));
}
};
Expand Down

0 comments on commit ad84137

Please sign in to comment.