Skip to content

Commit 8acd383

Browse files
authored
Fix incorrect use of buffer_size instead of bucket_size in retrieve (#686)
This PR fixes a minor bug in the retrieve function where `buffer_size` was incorrectly used instead of `bucket_size`.
1 parent 80f2ad7 commit 8acd383

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

include/cuco/detail/open_addressing/open_addressing_ref_impl.cuh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,15 +1214,15 @@ class open_addressing_ref_impl {
12141214
bool running = true;
12151215
[[maybe_unused]] bool found_match = false;
12161216

1217-
bool equals[buffer_size];
1218-
uint32_t exists[buffer_size];
1217+
bool equals[bucket_size];
1218+
uint32_t exists[bucket_size];
12191219

12201220
while (active_flushing_tile.any(running)) {
12211221
if (running) {
12221222
// TODO atomic_ref::load if insert operator is present
12231223
auto const bucket_slots = this->storage_ref_[*probing_iter];
12241224

1225-
#pragma unroll buffer_size
1225+
#pragma unroll bucket_size
12261226
for (int32_t i = 0; i < bucket_size; ++i) {
12271227
equals[i] = false;
12281228
if (running) {
@@ -1247,7 +1247,7 @@ class open_addressing_ref_impl {
12471247

12481248
probing_tile.sync();
12491249
running = probing_tile.all(running);
1250-
#pragma unroll buffer_size
1250+
#pragma unroll bucket_size
12511251
for (int32_t i = 0; i < bucket_size; ++i) {
12521252
exists[i] = probing_tile.ballot(equals[i]);
12531253
}
@@ -1274,7 +1274,7 @@ class open_addressing_ref_impl {
12741274
output_idx = probing_tile.shfl(output_idx, 0);
12751275

12761276
int32_t matches_offset = 0;
1277-
#pragma unroll buffer_size
1277+
#pragma unroll bucket_size
12781278
for (int32_t i = 0; i < bucket_size; ++i) {
12791279
if (equals[i]) {
12801280
auto const lane_offset = detail::count_least_significant_bits(exists[i], lane_id);

0 commit comments

Comments
 (0)