From 3694985462aedd88fe56d51c7d75c3691c6f7bd2 Mon Sep 17 00:00:00 2001 From: Sergey Kopienko Date: Mon, 17 Jun 2024 12:19:54 +0200 Subject: [PATCH] include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h - add break into __early_exit_find_or Signed-off-by: Sergey Kopienko --- include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h b/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h index b006eae051b..3ab717db63f 100644 --- a/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h +++ b/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h @@ -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())