Skip to content

Commit 0e94f6d

Browse files
authored
Change cuco::extent type usage from size_type to size_t (#23259)
Changes usages of `cuco::extent` to use `std::size_t` type instead of `cudf::size_type` to ensure slot indices do not overflow int. Follow on to #23236 -- PR fixes a couple more places that match this though they do not currently manifest any errors. Authors: - David Wendt (https://github.com/davidwendt) Approvers: - Bradley Dice (https://github.com/bdice) - Paul Mattione (https://github.com/pmattione-nvidia) URL: #23259
1 parent 69f13f4 commit 0e94f6d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

cpp/src/io/json/json_tree.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ rmm::device_uvector<size_type> hash_node_type_with_field_name(device_span<Symbol
682682
auto get_utf8_matched_field_nodes = [&]() {
683683
auto make_map = [&stream](auto num_keys) {
684684
using hasher_type3 = cudf::hashing::detail::default_hash<size_type>;
685-
return cuco::static_map{cuco::extent{num_keys},
685+
return cuco::static_map{cuco::extent{static_cast<std::size_t>(num_keys)},
686686
1.0, // 100% load factor
687687
cuco::empty_key{empty_node_index_sentinel},
688688
cuco::empty_value{empty_node_index_sentinel},

cpp/src/search/contains_table_impl.cuh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION.
2+
* SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

@@ -133,7 +133,7 @@ void perform_contains(table_view const& haystack,
133133
return lhs_index_type{idx};
134134
}));
135135

136-
auto set = cuco::static_set{cuco::extent{haystack.num_rows()},
136+
auto set = cuco::static_set{cuco::extent{static_cast<std::size_t>(haystack.num_rows())},
137137
cudf::detail::CUCO_DESIRED_LOAD_FACTOR,
138138
cuco::empty_key{rhs_index_type{-1}},
139139
d_equal,

0 commit comments

Comments
 (0)