Add static_multimap::pair_contains#175
Conversation
| auto current_slot = initial_slot(g, k); | ||
| auto current_slot = [&]() { | ||
| if constexpr (is_pair_contains) { return initial_slot(g, element.first); } | ||
| if constexpr (not is_pair_contains) { return initial_slot(g, element); } |
There was a problem hiding this comment.
Now I recall, we need this to silence the compiler warnings with cuda-11.0/11.2. Reverting back to the if constexpr (not ...) expression.
|
I tested locally with my PR. Will work with this fix: 331b248. |
include/cuco/static_multimap.cuh
Outdated
| __device__ __forceinline__ bool pair_contains( | ||
| cooperative_groups::thread_block_tile<ProbeSequence::cg_size> const& g, | ||
| value_type const& p, | ||
| PairEqual pair_equal = PairEqual{}) noexcept; |
There was a problem hiding this comment.
In addition, we also need to add the version of pair_contains here without the thread_block_tile parameter.
There was a problem hiding this comment.
This is exposed to the users, right? So the users don't have that parameter.
There was a problem hiding this comment.
Unlike single map, multimap needs to handle duplicates. That's the reason that we provide CG APIs only in multimap. Non-CG APIs are provided in single map but are also rarely used. Can you provide more details on your use case i.e. why would non-CG implementation is preferred over the CG ones?
There was a problem hiding this comment.
So the users don't have that parameter.
users can create a CG e.g. https://godbolt.org/z/o6jYYv7Ys
469776f to
32d0b17
Compare
|
Confirm that the latest commit works with my code. |
A (left) semi-join between the left and right tables returns a set of rows in the left table that has matching rows (i.e., compared equally) in the right table. As such, for each row in the left table, it needs to check if that row has a match in the right table. Such check is very generic and has applications in many other places, not just in semi-join. This PR exposes that check functionality as a new `cudf::detail::contains(table_view, table_view)` for internal usage. Closes #11037. Depends on: * NVIDIA/cuCollections#175 Authors: - Nghia Truong (https://github.com/ttnghia) Approvers: - Vyas Ramasubramani (https://github.com/vyasr) - Yunsong Wang (https://github.com/PointKernel) URL: #11100
This PR adds the following APIs for set operations: * `lists::have_overlap` * `lists::intersect_distinct` * `lists::union_distinct` * `lists::difference_distinct` ### Name Convention Except for the first API (`lists::have_overlap`) that returns a boolean column, the suffix `_distinct` of the rest APIs denotes that their results will be lists columns in which all list rows have been post-processed to remove duplicates. As such, their results are actually "set" columns in which each row is a "set" of distinct elements. --- Depends on: * #10945 * #11017 * NVIDIA/cuCollections#175 * #11052 * #11118 * #11100 * #11149 Closes #10409. Authors: - Nghia Truong (https://github.com/ttnghia) - Yunsong Wang (https://github.com/PointKernel) Approvers: - Michael Wang (https://github.com/isVoid) - AJ Schmidt (https://github.com/ajschmidt8) - Bradley Dice (https://github.com/bdice) - Yunsong Wang (https://github.com/PointKernel) URL: #11043
Depends on #174
Contributes to #173
This PR adds
static_multimap::pair_contains.