Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add comments explaining intention of unique_ptr::reset call
  • Loading branch information
oleksandr-pavlyk committed Jan 9, 2025
commit ce02c6ceca7f4f5e873eee8f702c9356e9715f49
6 changes: 4 additions & 2 deletions dpctl/tensor/libtensor/include/kernels/accumulators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,8 @@ std::size_t cumsum_val_contig_impl(sycl::queue &q,
copy_e.wait();
std::size_t return_val = static_cast<std::size_t>(*last_elem_host_usm);

// free USM host allocation
// explicitly free USM host allocation, by envoking deleter of
// the unique_ptr
host_usm_owner.reset(nullptr);
Comment thread
oleksandr-pavlyk marked this conversation as resolved.

return return_val;
Expand Down Expand Up @@ -1347,7 +1348,8 @@ cumsum_val_strided_impl(sycl::queue &q,
copy_e.wait();
std::size_t return_val = static_cast<std::size_t>(*last_elem_host_usm);

// free USM-host temporary
// explicitly free USM-host temporary, by envoking deleter of
// the unique_ptr
host_usm_owner.reset(nullptr);
Comment thread
oleksandr-pavlyk marked this conversation as resolved.

return return_val;
Expand Down