Skip to content

Commit

Permalink
*ptr instead of ptr[0]
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 6, 2024
1 parent d4b44d5 commit 4e4c0bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ struct __parallel_copy_if_static_single_group_submitter<_Size, _ElemsPerItem, _W
if (__item_id == 0)
{
// Add predicate of last element to account for the scan's exclusivity
__res_ptr[0] = __lacc[__elems_per_wg + __n - 1] + __lacc[__n - 1];
*__res_ptr = __lacc[__elems_per_wg + __n - 1] + __lacc[__n - 1];
}
});
});
Expand Down
4 changes: 2 additions & 2 deletions include/oneapi/dpl/pstl/hetero/dpcpp/unseq_backend_sycl.h
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ struct __copy_by_mask
if (__item_idx == 0)
{
//copy final result to output
__ret_ptr[0] = __wg_sums_ptr[(__n - 1) / __size_per_wg];
*__ret_ptr = __wg_sums_ptr[(__n - 1) / __size_per_wg];
}
}
};
Expand Down Expand Up @@ -675,7 +675,7 @@ struct __partition_by_mask
if (__item_idx == 0)
{
//copy final result to output
__ret_ptr[0] = __wg_sums_ptr[(__n - 1) / __size_per_wg];
*__ret_ptr = __wg_sums_ptr[(__n - 1) / __size_per_wg];
}
}
};
Expand Down

0 comments on commit 4e4c0bc

Please sign in to comment.