Skip to content

Commit

Permalink
include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge_sort…
Browse files Browse the repository at this point in the history
….h - refactoring of __merge_sort_global_submitter __lookup_sp

Signed-off-by: Sergey Kopienko <[email protected]>
  • Loading branch information
SergeyKopienko committed Dec 22, 2024
1 parent 191d608 commit ecd7b48
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,12 @@ struct __merge_sort_global_submitter<_IndexT, __internal::__optional_kernel_name
__diagonal_idx > 0 ? __base_diagonals_sp_global_ptr[__diagonal_idx - 1] : _merge_split_point_t{0, 0};
const _merge_split_point_t __sp_right = __base_diagonals_sp_global_ptr[__diagonal_idx];

const bool __is_base_diagonal = __global_idx % __nd_range_params.steps_between_two_base_diags == 0;

return __sp_right.first + __sp_right.second > 0
? (__global_idx % __nd_range_params.steps_between_two_base_diags != 0
? __find_start_point(__views.rng1, __sp_left.first, __sp_right.first, __views.rng2,
__sp_left.second, __sp_right.second, __data_area.i_elem_local, __comp)
? (!__is_base_diagonal
? __find_start_point_in(__views.rng1, __sp_left.first, __sp_right.first, __views.rng2,
__sp_left.second, __sp_right.second, __data_area.i_elem_local, __comp)
: __sp_left)
: __find_start_point_w(__data_area, __views, __comp);
}
Expand Down

0 comments on commit ecd7b48

Please sign in to comment.