Skip to content

Commit 070fc54

Browse files
committed
Fix init bug
1 parent fa7c7e1 commit 070fc54

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

include/cuco/detail/open_addressing/open_addressing_ref_impl.cuh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -965,9 +965,9 @@ class open_addressing_ref_impl {
965965
size_type count = 0;
966966

967967
while (true) {
968-
auto const bucket_slots = storage_ref_[*probing_iter];
969-
int32_t equals[bucket_size];
970-
bool empty_found = false;
968+
auto const bucket_slots = storage_ref_[*probing_iter];
969+
int32_t equals[bucket_size] = {0};
970+
bool empty_found = false;
971971

972972
#pragma unroll bucket_size
973973
for (int32_t i = 0; i < bucket_size; ++i) {
@@ -1009,9 +1009,9 @@ class open_addressing_ref_impl {
10091009
size_type count = 0;
10101010

10111011
while (true) {
1012-
auto const bucket_slots = storage_ref_[*probing_iter];
1013-
int32_t equals[bucket_size];
1014-
bool empty_found = false;
1012+
auto const bucket_slots = storage_ref_[*probing_iter];
1013+
int32_t equals[bucket_size] = {0};
1014+
bool empty_found = false;
10151015

10161016
#pragma unroll bucket_size
10171017
for (int32_t i = 0; i < bucket_size; ++i) {

0 commit comments

Comments
 (0)