Skip to content

Commit

Permalink
Improve performance of find_or pattern (#1624)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyKopienko authored Jun 19, 2024
1 parent 35dcc97 commit 224acf7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,10 @@ struct __early_exit_find_or
if (__shifted_idx < __n && __pred(__shifted_idx, __rngs...))
{
if constexpr (_OrTagType::value)
{
__found_local.store(1);
break;
}
else
{
for (auto __old = __found_local.load(); __comp(__shifted_idx, __old); __old = __found_local.load())
Expand Down

0 comments on commit 224acf7

Please sign in to comment.