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 gpu errors #306

Merged
merged 3 commits into from
Dec 4, 2024
Merged
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
25 changes: 20 additions & 5 deletions src/care/host_device_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace care {
class host_device_map< key_type, mapped_type, RAJA::seq_exec> {
public:
// default constructor
host_device_map() noexcept = default;
host_device_map() noexcept {};

// constructor taking max number of entries
host_device_map(size_t max_entries) : host_device_map{} {
Expand All @@ -86,7 +86,15 @@ namespace care {
}

// copy constructor
host_device_map(host_device_map const & other) noexcept = default;
host_device_map(host_device_map const & other) noexcept :
m_map(other.m_map),
m_size(other.m_size),
m_iterator(other.m_iterator),
m_next_iterator_index(other.m_next_iterator_index),
m_max_size(other.m_max_size),
m_signal(other.m_signal)
{
}

// move constructor
host_device_map(host_device_map && other) noexcept {
Expand Down Expand Up @@ -387,7 +395,7 @@ namespace care {
{
public:
// default constructor
host_device_map() noexcept = default;
host_device_map() noexcept {};

// constructor
host_device_map(size_t max_entries) : host_device_map{} {
Expand All @@ -406,9 +414,16 @@ namespace care {
}

// copy constructor
host_device_map(host_device_map const & other) noexcept = default;
host_device_map(host_device_map const & other) noexcept :
m_size_ptr(other.m_size_ptr),
m_size(other.m_size),
m_map(other.m_map),
m_max_size(other.m_max_size),
m_signal(other.m_signal)
{
}

// move constructor
// move constructor
host_device_map(host_device_map && other) noexcept {
delete m_size_ptr;
m_size_ptr = other.m_size_ptr;
Expand Down