From 845e977a5c66166d811f16e7f5af2bd6ba097866 Mon Sep 17 00:00:00 2001 From: Yunsong Wang Date: Mon, 13 Nov 2023 14:26:26 -0800 Subject: [PATCH] Resolve conflicts --- .../open_addressing/open_addressing_ref_impl.cuh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/include/cuco/detail/open_addressing/open_addressing_ref_impl.cuh b/include/cuco/detail/open_addressing/open_addressing_ref_impl.cuh index a68ef2db7..5b44fa066 100644 --- a/include/cuco/detail/open_addressing/open_addressing_ref_impl.cuh +++ b/include/cuco/detail/open_addressing/open_addressing_ref_impl.cuh @@ -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 @@ -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;