Fix problems with heterogeneous insert input types#387
Fix problems with heterogeneous insert input types#387sleeepyjack merged 16 commits intoNVIDIA:devfrom
Conversation
include/cuco/detail/open_addressing/open_addressing_ref_impl.cuh
Outdated
Show resolved
Hide resolved
…A#388) There are no actual code changes but moving files around.
97ee797 to
07a60be
Compare
07a60be to
b7c114e
Compare
| Value const& desired) noexcept | ||
| { | ||
| auto old = compare_and_swap(address, expected, static_cast<value_type>(desired)); | ||
| auto old = compare_and_swap(address, expected, this->native_value(desired)); |
There was a problem hiding this comment.
native_value is used only once. Either it's not needed or it should be applied in other places as well.
There was a problem hiding this comment.
I'd say yes, but I think I will need that function for insert_or_apply soon. We can either introduce the function in this PR or the insert_or_apply PR.
|
I fucked up the merge…investigating |
PointKernel
left a comment
There was a problem hiding this comment.
One question: when to use heterogeneous_value and when to use native_value?
include/cuco/detail/open_addressing/open_addressing_ref_impl.cuh
Outdated
Show resolved
Hide resolved
The workflow is as follows: Take the user-provided pair-like input type and convert it to |
When dealing with hasher/comparator, can we use |
You mean using the user-provided pair-like type instead of the heterogeneous intermediate type internally and use |
So we could remove |
|
This PR fixes some of the problems with heterogeneous insert for
static_map.The input type to any of the
insert(_*)operators is nowcuco::pair<ProbeKey, mapped_type>.Also updates docs for both map and set regarding type requirements of
ProbeKey.Also adds a small convenient abstraction aka
attempt_insert_stable.