Skip to content

Commit

Permalink
Remove unnecessary is_partitioned check in partition_point
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Michel <[email protected]>
  • Loading branch information
mmichel11 committed Jun 4, 2024
1 parent bbd870b commit d41e9c0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions clang/runtime/dpct-rt/include/dpct/dpl_extras/algorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,7 @@ Iter partition_point(Policy &&policy, Iter first, Iter last, Pred p) {
std::is_same<typename std::iterator_traits<Iter>::iterator_category,
std::random_access_iterator_tag>::value,
"Iterators passed to algorithms must be random-access iterators.");
if (std::is_partitioned(policy, first, last, p))
return std::find_if_not(std::forward<Policy>(policy), first, last, p);
else
return first;
return std::find_if_not(std::forward<Policy>(policy), first, last, p);
}

template <typename Policy, typename Iter1, typename Iter2, typename Iter3,
Expand Down

0 comments on commit d41e9c0

Please sign in to comment.