Skip to content

Commit

Permalink
Fix bug in kv_store_t's insertion methods (#4444)
Browse files Browse the repository at this point in the history
Update size_ field of kv_cuco_store_t with correct values.

Authors:
  - Naim (https://github.com/naimnv)

Approvers:
  - Chuck Hastings (https://github.com/ChuckHastings)
  - Seunghwa Kang (https://github.com/seunghwak)

URL: #4444
  • Loading branch information
naimnv authored May 25, 2024
1 parent 6c333d3 commit 30465c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpp/src/prims/kv_store.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ class kv_cuco_store_t {
store_value_offsets.end(),
kv_cuco_insert_and_increment_t<decltype(mutable_device_ref), KeyIterator>{
mutable_device_ref, key_first, counter.data(), std::numeric_limits<size_t>::max()});
size_ += counter.value(stream);
size_ = counter.value(stream);
resize_optional_dataframe_buffer<value_t>(store_values_, size_, stream);
thrust::scatter_if(rmm::exec_policy(stream),
value_first,
Expand Down Expand Up @@ -636,7 +636,7 @@ class kv_cuco_store_t {
pred_op,
counter.data(),
std::numeric_limits<size_t>::max()});
size_ += counter.value(stream);
size_ = counter.value(stream);
resize_optional_dataframe_buffer<value_t>(store_values_, size_, stream);
thrust::scatter_if(rmm::exec_policy(stream),
value_first,
Expand Down Expand Up @@ -688,7 +688,7 @@ class kv_cuco_store_t {
store_value_offsets.end(),
kv_cuco_insert_and_increment_t<decltype(mutable_device_ref), KeyIterator>{
mutable_device_ref, key_first, counter.data(), std::numeric_limits<size_t>::max()});
size_ += counter.value(stream);
size_ = counter.value(stream);
resize_optional_dataframe_buffer<value_t>(store_values_, size_, stream);
thrust::scatter_if(rmm::exec_policy(stream),
value_first,
Expand Down

0 comments on commit 30465c2

Please sign in to comment.