Skip to content

Commit

Permalink
Fix potential logic issues in CG erase (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
PointKernel authored Nov 19, 2023
1 parent 9966541 commit c5f94e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions include/cuco/detail/open_addressing/open_addressing_ref_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -646,12 +646,12 @@ class open_addressing_ref_impl {
case insert_result::DUPLICATE: return false;
default: continue;
}
} else if (group.any(state == detail::equal_result::EMPTY)) {
// Key doesn't exist, return false
return false;
} else {
++probing_iter;
}

// Key doesn't exist, return false
if (group.any(state == detail::equal_result::EMPTY)) { return false; }

++probing_iter;
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/static_map/erase_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ TEMPLATE_TEST_CASE_SIG(
(int64_t, int32_t, cuco::test::probe_sequence::linear_probing, 2),
(int64_t, int64_t, cuco::test::probe_sequence::linear_probing, 2))
{
constexpr size_type num_keys{400};
constexpr size_type num_keys{1'000'000};

using probe =
std::conditional_t<Probe == cuco::test::probe_sequence::linear_probing,
Expand Down

0 comments on commit c5f94e5

Please sign in to comment.