From d41e9c091ccb7587b3d97e2e1b9a77cbd82e7d08 Mon Sep 17 00:00:00 2001 From: Matthew Michel Date: Tue, 4 Jun 2024 15:31:03 -0500 Subject: [PATCH] Remove unnecessary is_partitioned check in partition_point Signed-off-by: Matthew Michel --- clang/runtime/dpct-rt/include/dpct/dpl_extras/algorithm.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/clang/runtime/dpct-rt/include/dpct/dpl_extras/algorithm.h b/clang/runtime/dpct-rt/include/dpct/dpl_extras/algorithm.h index 66ec11f1e43a..f8b40c2e63ca 100644 --- a/clang/runtime/dpct-rt/include/dpct/dpl_extras/algorithm.h +++ b/clang/runtime/dpct-rt/include/dpct/dpl_extras/algorithm.h @@ -213,10 +213,7 @@ Iter partition_point(Policy &&policy, Iter first, Iter last, Pred p) { std::is_same::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), first, last, p); - else - return first; + return std::find_if_not(std::forward(policy), first, last, p); } template