From 212366437a59ced89557c379eecbfdb13fb43b42 Mon Sep 17 00:00:00 2001 From: Sergey Kopienko Date: Thu, 19 Dec 2024 22:29:04 +0100 Subject: [PATCH] include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge.h - fix review comment: remove if conditions checks from __parallel_merge_submitter_large::eval_split_points_for_groups Signed-off-by: Sergey Kopienko --- .../dpcpp/parallel_backend_sycl_merge.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge.h b/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge.h index ffaad0673d0..464a8e60797 100644 --- a/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge.h +++ b/include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge.h @@ -319,17 +319,14 @@ struct __parallel_merge_submitter_large<_IdType, _CustomName, auto __base_diagonals_sp_global_ptr = _Storage::__get_usm_or_buffer_accessor_ptr(__base_diagonals_sp_global_acc); - _split_point_t<_IdType> __sp = - __global_idx == 0 ? _split_point_t<_IdType>{0, 0} : _split_point_t<_IdType>{__n1, __n2}; - - if (0 < __global_idx && __global_idx < __nd_range_params.base_diag_count) - { - const _IdType __i_elem = __global_idx * __base_diag_chunk; - if (__i_elem < __n) - __sp = __find_start_point(__rng1, __rng2, __i_elem, __n1, __n2, __comp); - } - - __base_diagonals_sp_global_ptr[__global_idx] = __sp; + const _IdType __i_elem = __global_idx * __base_diag_chunk; + + __base_diagonals_sp_global_ptr[__global_idx] = + __i_elem == 0 + ? _split_point_t<_IdType>{0, 0} + : __i_elem < __n + ? __find_start_point(__rng1, __rng2, __i_elem, __n1, __n2, __comp) + : _split_point_t<_IdType>{__n1, __n2}; }); }); }