Skip to content

Commit b96d134

Browse files
Fix comments
1 parent 4fa4548 commit b96d134

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,8 @@ struct __parallel_merge_submitter<_OutSizeLimit, _IdType, __internal::__optional
261261
});
262262
});
263263

264-
// Save the raw pointer into a shared_ptr to return it in __future and extend the lifetime of the storage.
264+
// Save the raw pointer into a __result_and_scratch_storage_base_ptr_t to return it
265+
// in __future and extend the lifetime of the storage.
265266
// We should return the same thing in the second param of __future for compatibility
266267
// with the returning value in __parallel_merge_submitter_large::operator()
267268
return __future<sycl::event, __result_and_scratch_storage_base_ptr_t>{
@@ -444,7 +445,8 @@ struct __parallel_merge_submitter_large<_OutSizeLimit, _IdType, _CustomName,
444445
auto __p_base_diagonals_sp_global_storage =
445446
new __result_and_scratch_storage_t(__q, __nd_range_params.base_diag_count + 1);
446447

447-
// Save the raw pointer into a shared_ptr to return it in __future and extend the lifetime of the storage.
448+
// Save the raw pointer into a __result_and_scratch_storage_base_ptr_t to return it
449+
// in __future and extend the lifetime of the storage.
448450
__result_and_scratch_storage_base_ptr_t __p_result_and_scratch_storage_base(
449451
static_cast<__result_and_scratch_storage_base*>(__p_base_diagonals_sp_global_storage));
450452

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,8 @@ struct __merge_sort_global_submitter<_IndexT, __internal::__optional_kernel_name
591591
// Storage to save split-points on each base diagonal + 1 (for the right base diagonal in the last work-group)
592592
__base_diagonals_sp_storage_t* __p_base_diagonals_sp_global_storage = nullptr;
593593

594-
// shared_ptr instance to return it in __future and extend the lifetime of the storage.
594+
// __result_and_scratch_storage_base_ptr_t instance to return it
595+
// in __future and extend the lifetime of the storage.
595596
__result_and_scratch_storage_base_ptr_t __p_result_and_scratch_storage_base;
596597

597598
// Max amount of base diagonals
@@ -615,7 +616,8 @@ struct __merge_sort_global_submitter<_IndexT, __internal::__optional_kernel_name
615616
__p_base_diagonals_sp_global_storage =
616617
new __base_diagonals_sp_storage_t(__q, __max_base_diags_count);
617618

618-
// Save the raw pointer into a shared_ptr to return it in __future and extend the lifetime of the storage.
619+
// Save the raw pointer into a __result_and_scratch_storage_base_ptr_t
620+
// to return it in __future and extend the lifetime of the storage.
619621
__p_result_and_scratch_storage_base.reset(
620622
static_cast<__result_and_scratch_storage_base*>(__p_base_diagonals_sp_global_storage));
621623
}

0 commit comments

Comments
 (0)