Skip to content

Commit

Permalink
updates again
Browse files Browse the repository at this point in the history
  • Loading branch information
PointKernel committed Nov 9, 2023
1 parent 0988044 commit 6a563f4
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions include/cuco/detail/open_addressing/open_addressing_ref_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -406,19 +406,16 @@ class open_addressing_ref_impl {
return packed_cas(window_ptr + i, window_slots[i], value);
} else {
auto const expected_payload = window_slots[i].second;
auto const res = cas_dependent_write(window_ptr + i, window_slots[i], value);
if (res == insert_result::SUCCESS) {
using mapped_type = decltype(this->empty_slot_sentinel_.second);
auto ref =
cuda::atomic<mapped_type, cuda::thread_scope_device>{(window_ptr + i)->second};
mapped_type old;
int n = 0;
do {
old = ref.load(cuda::std::memory_order_relaxed);
printf(
"old: %d expected_payload: %d n: %d\n", int(old), int(expected_payload), n);
} while (cuco::detail::bitwise_compare(old, expected_payload));
}
auto const res = cas_dependent_write(window_ptr + i, window_slots[i], value);
using mapped_type = decltype(this->empty_slot_sentinel_.second);
auto ref =
cuda::atomic<mapped_type, cuda::thread_scope_device>{(window_ptr + i)->second};
mapped_type old;
int n = 0;
do {
old = ref.load(cuda::std::memory_order_relaxed);
printf("old: %d expected_payload: %d n: %d\n", int(old), int(expected_payload), n);
} while (cuco::detail::bitwise_compare(old, expected_payload));
return res;
}
}();
Expand Down

0 comments on commit 6a563f4

Please sign in to comment.