Skip to content

Commit

Permalink
minor comments from review + formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
  • Loading branch information
danhoeflinger committed Aug 29, 2024
1 parent e57573f commit 93189b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions include/oneapi/dpl/pstl/hetero/dpcpp/parallel_backend_sycl.h
Original file line number Diff line number Diff line change
Expand Up @@ -783,9 +783,9 @@ struct __gen_transform_input

struct __simple_write_to_id
{
template <typename _OutRng, typename ValueType>
template <typename _OutRng, typename _ValueType>
void
operator()(_OutRng& __out_rng, std::size_t __id, const ValueType& __v) const
operator()(_OutRng& __out_rng, std::size_t __id, const _ValueType& __v) const
{
// Use of an explicit cast to our internal tuple type is required to resolve conversion issues between our
// internal tuple and std::tuple. If the underlying type is not a tuple, then the type will just be passed through.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ __inclusive_sub_group_masked_scan(const __dpl_sycl::__sub_group& __sub_group, _M
{
__init_and_carry.__setup(sycl::group_broadcast(__sub_group, __value, __init_broadcast_id));
}

//return by reference __value and __init_and_carry
}

Expand Down Expand Up @@ -485,7 +484,7 @@ struct __parallel_reduce_then_scan_scan_submitter<__sub_group_size, __max_inputs
// and then write back the final values to memory
if (__sub_group_id == 0)
{
// step 1) load to Xe SLM the WG-local S prefix sums
// step 1) load to SLM the WG-local S prefix sums
// on WG T-local carries
// 0: T0 carry, 1: T0 + T1 carry, 2: T0 + T1 + T2 carry, ...
// S: sum(T0 carry...TS carry)
Expand Down Expand Up @@ -596,9 +595,8 @@ struct __parallel_reduce_then_scan_scan_submitter<__sub_group_size, __max_inputs
{
if (__sub_group_id > 0)
{
_InitValueType __value = __sub_group_id - 1 < __active_subgroups
? __sub_group_partials[__sub_group_id - 1]
: __sub_group_partials[__active_subgroups - 1];
_InitValueType __value =
__sub_group_partials[std::min(__sub_group_id - 1, __active_subgroups - 1)];
oneapi::dpl::unseq_backend::__init_processing<_InitValueType>{}(__init, __value, __reduce_op);
__sub_group_carry.__setup(__value);
}
Expand Down Expand Up @@ -627,9 +625,8 @@ struct __parallel_reduce_then_scan_scan_submitter<__sub_group_size, __max_inputs
{
if (__sub_group_id > 0)
{
_InitValueType __value = __sub_group_id - 1 < __active_subgroups
? __sub_group_partials[__sub_group_id - 1]
: __sub_group_partials[__active_subgroups - 1];
_InitValueType __value =
__sub_group_partials[std::min(__sub_group_id - 1, __active_subgroups - 1)];
__sub_group_carry.__setup(__reduce_op(__get_block_carry_in(__block_num, __tmp_ptr), __value));
}
else if (__group_id > 0)
Expand Down

0 comments on commit 93189b0

Please sign in to comment.