Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix full chain algorithm deallocation order #664

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 1 addition & 6 deletions examples/run/alpaka/full_chain_algorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,7 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent)
m_filter_config(parent.m_filter_config) {
}

full_chain_algorithm::~full_chain_algorithm() {

// We need to ensure that the caching memory resource would be deleted
// before the device memory resource that it is based on.
m_cached_device_mr.reset();
}
Comment on lines -84 to -89
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't touch the header file...

full_chain_algorithm::~full_chain_algorithm() = default;

full_chain_algorithm::output_type full_chain_algorithm::operator()(
const cell_collection_types::host& cells,
Expand Down
7 changes: 1 addition & 6 deletions examples/run/cuda/full_chain_algorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,7 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent)
}
}

full_chain_algorithm::~full_chain_algorithm() {

// We need to ensure that the caching memory resource would be deleted
// before the device memory resource that it is based on.
m_cached_device_mr.reset();
}
full_chain_algorithm::~full_chain_algorithm() = default;

full_chain_algorithm::output_type full_chain_algorithm::operator()(
const cell_collection_types::host& cells,
Expand Down
2 changes: 0 additions & 2 deletions examples/run/sycl/full_chain_algorithm.sycl
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ full_chain_algorithm::full_chain_algorithm(const full_chain_algorithm& parent)

full_chain_algorithm::~full_chain_algorithm() {
// Need to ensure that objects would be deleted in the correct order.
m_cached_device_mr.reset();
m_device_mr.reset();
delete m_data;
}

Expand Down
Loading