From f2fd99469bc5a105ca5fe274b90e59adb08b985c Mon Sep 17 00:00:00 2001 From: Yunsong Wang Date: Thu, 7 Sep 2023 16:59:59 -0700 Subject: [PATCH] Refactor contains_table with cuco::static_set --- cpp/src/search/contains_table.cu | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cpp/src/search/contains_table.cu b/cpp/src/search/contains_table.cu index 628ba2c4c3b..7455bd1b15d 100644 --- a/cpp/src/search/contains_table.cu +++ b/cpp/src/search/contains_table.cu @@ -138,7 +138,6 @@ std::pair build_row_bitmask(table_view return std::pair(rmm::device_buffer{0, stream}, nullable_columns.front().null_mask()); } -} // namespace template void dispatch( null_equality compare_nulls, auto self_comp, auto two_table_comp, auto nan_comp, Func func) @@ -176,6 +175,8 @@ void dispatch_nan_comparator(nan_equality compare_nans, } } +} // namespace + /** * @brief Check if rows in the given `needles` table exist in the `haystack` table. * @@ -223,7 +224,7 @@ rmm::device_uvector contains(table_view const& haystack, auto const needles_iter = cudf::detail::make_counting_transform_iterator( size_type{0}, [] __device__(auto idx) { return rhs_index_type{idx}; }); - auto const helper_func = [&](auto const& d_self_equal, auto const& d_two_table_equal) { + auto helper_func = [&](auto const& d_self_equal, auto const& d_two_table_equal) { auto const d_equal = comparator_adapter{d_self_equal, d_two_table_equal}; auto set = cuco::experimental::static_set{