Skip to content

Commit

Permalink
Refactor contains_table with cuco::static_set
Browse files Browse the repository at this point in the history
  • Loading branch information
PointKernel committed Sep 7, 2023
1 parent 8f2294f commit f2fd994
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cpp/src/search/contains_table.cu
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ std::pair<rmm::device_buffer, bitmask_type const*> build_row_bitmask(table_view
return std::pair(rmm::device_buffer{0, stream}, nullable_columns.front().null_mask());
}

} // namespace
template <bool haystack_has_nulls, bool has_any_nulls, typename Func>
void dispatch(
null_equality compare_nulls, auto self_comp, auto two_table_comp, auto nan_comp, Func func)
Expand Down Expand Up @@ -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.
*
Expand Down Expand Up @@ -223,7 +224,7 @@ rmm::device_uvector<bool> 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{
Expand Down

0 comments on commit f2fd994

Please sign in to comment.