Skip to content

Commit b32c911

Browse files
include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge.h - fix types in __parallel_merge_submitter_large::operator()
Signed-off-by: Sergey Kopienko <[email protected]>
1 parent 0ca542a commit b32c911

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl_merge.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -394,20 +394,20 @@ struct __parallel_merge_submitter_large<_IdType, _CustomName,
394394
_RangeValueType* __rng1_cache_slm = std::addressof(__loc_acc[0]);
395395
_RangeValueType* __rng2_cache_slm = std::addressof(__loc_acc[0]) + __rng1_wg_data_size;
396396

397-
const std::size_t __chunk_of_data_reading = std::max(__data_items_in_slm_bank, oneapi::dpl::__internal::__dpl_ceiling_div(__rng1_wg_data_size + __rng2_wg_data_size, __wi_in_one_wg));
397+
const _IdType __chunk_of_data_reading = std::max(__data_items_in_slm_bank, oneapi::dpl::__internal::__dpl_ceiling_div(__rng1_wg_data_size + __rng2_wg_data_size, __wi_in_one_wg));
398398

399-
const std::size_t __how_many_wi_reads_rng1 = oneapi::dpl::__internal::__dpl_ceiling_div(__rng1_wg_data_size, __chunk_of_data_reading);
400-
const std::size_t __how_many_wi_reads_rng2 = oneapi::dpl::__internal::__dpl_ceiling_div(__rng2_wg_data_size, __chunk_of_data_reading);
399+
const _IdType __how_many_wi_reads_rng1 = oneapi::dpl::__internal::__dpl_ceiling_div(__rng1_wg_data_size, __chunk_of_data_reading);
400+
const _IdType __how_many_wi_reads_rng2 = oneapi::dpl::__internal::__dpl_ceiling_div(__rng2_wg_data_size, __chunk_of_data_reading);
401401

402402
// Calculate the amount of WI for read data from rng1
403403
if (__local_id < __how_many_wi_reads_rng1)
404404
{
405-
const std::size_t __idx_begin = __local_id * __chunk_of_data_reading;
405+
const _IdType __idx_begin = __local_id * __chunk_of_data_reading;
406406

407407
// Cooperative data load from __rng1 to __rng1_cache_slm
408408
if (__idx_begin < __rng1_wg_data_size)
409409
{
410-
const std::size_t __idx_end = std::min(__idx_begin + __chunk_of_data_reading, (std::size_t)__rng1_wg_data_size);
410+
const _IdType __idx_end = std::min(__idx_begin + __chunk_of_data_reading, __rng1_wg_data_size);
411411

412412
_ONEDPL_PRAGMA_UNROLL
413413
for (_IdType __idx = __idx_begin; __idx < __idx_end; ++__idx)
@@ -418,12 +418,12 @@ struct __parallel_merge_submitter_large<_IdType, _CustomName,
418418
const std::size_t __first_wi_local_id_for_read_rng2 = __wi_in_one_wg - __how_many_wi_reads_rng2 - 1;
419419
if (__local_id >= __first_wi_local_id_for_read_rng2)
420420
{
421-
const std::size_t __idx_begin = (__local_id - __first_wi_local_id_for_read_rng2) * __chunk_of_data_reading;
421+
const _IdType __idx_begin = (__local_id - __first_wi_local_id_for_read_rng2) * __chunk_of_data_reading;
422422

423423
// Cooperative data load from __rng2 to __rng2_cache_slm
424424
if (__idx_begin < __rng2_wg_data_size)
425425
{
426-
const std::size_t __idx_end = std::min(__idx_begin + __chunk_of_data_reading, (std::size_t)__rng2_wg_data_size);
426+
const _IdType __idx_end = std::min(__idx_begin + __chunk_of_data_reading, __rng2_wg_data_size);
427427

428428
_ONEDPL_PRAGMA_UNROLL
429429
for (_IdType __idx = __idx_begin; __idx < __idx_end; ++__idx)

0 commit comments

Comments
 (0)