Skip to content

Commit

Permalink
Resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
PointKernel committed Nov 13, 2023
1 parent 2b1175d commit 845e977
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions include/cuco/detail/open_addressing/open_addressing_ref_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,9 @@ class open_addressing_ref_impl {

// If the key is already in the container, return false
if (eq_res == detail::equal_result::EQUAL) {
this->wait_for_payload((window_ptr + i)->second, this->empty_slot_sentinel_.second);
if constexpr (has_payload) {
this->wait_for_payload((window_ptr + i)->second, this->empty_slot_sentinel_.second);
}
return {iterator{&window_ptr[i]}, false};
}
if (eq_res == detail::equal_result::EMPTY or
Expand All @@ -415,11 +417,15 @@ class open_addressing_ref_impl {
}();
switch (res) {
case insert_result::SUCCESS: {
this->wait_for_payload((window_ptr + i)->second, this->empty_slot_sentinel_.second);
if constexpr (has_payload) {
this->wait_for_payload((window_ptr + i)->second, this->empty_slot_sentinel_.second);
}
return {iterator{&window_ptr[i]}, true};
}
case insert_result::DUPLICATE: {
this->wait_for_payload((window_ptr + i)->second, this->empty_slot_sentinel_.second);
if constexpr (has_payload) {
this->wait_for_payload((window_ptr + i)->second, this->empty_slot_sentinel_.second);
}
return {iterator{&window_ptr[i]}, false};
}
default: continue;
Expand Down

0 comments on commit 845e977

Please sign in to comment.