You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[ENHANCEMENT]: Consider removing the use of argument_type and result_type from hasher in cuco default_filter_policy #653
Is your feature request related to a problem? Please describe.
The member type std::hash::argument_type is deprecated in C++17 and removed in C++20, so we should consider syncing with STL and remove them from our hashers as well as their use in bloom filter policies.
changed the title [-][ENHANCEMENT]: Consider removing the use of `hasher::argument_type` and `hasher::result_type` in cuCo default and arrow filter policies[/-][+][ENHANCEMENT]: Consider removing the use of `argument_type` and `result_type` from `hasher` in cuo default and arrow filter policies[/+]on Dec 10, 2024
I thought about mentioning this during the code review but didn’t want to come across as nitpicking.
No worries about that. I am always for pursuing excellence and attention to the detail is how we all learn. 😄
I think this is a great idea. Let's do this. But we still would be using the member types (argument_type and result_type) from the hasher which Bradley mentioned
we still would be using the member types (argument_type and result_type) from the hasher
Half-half. The argument_type will simply be key_type (using key_type = Key). However, retaining result_type (should be hash_value_type of the policy) is still desirable. The STL simplifies hashers by always using std::size_t as the return type, but this approach is suboptimal, especially in terms of performance and for GPUs. Such oversimplification does not fit our goals and IMO should be avoided.
changed the title [-][ENHANCEMENT]: Consider removing the use of `argument_type` and `result_type` from `hasher` in cuo default and arrow filter policies[/-][+][ENHANCEMENT]: Consider removing the use of `argument_type` and `result_type` from `hasher` in cuco `default_filter_policy`[/+]on Dec 10, 2024
Activity
[-][ENHANCEMENT]: Consider removing the use of `hasher::argument_type` and `hasher::result_type` in cuCo default and arrow filter policies[/-][+][ENHANCEMENT]: Consider removing the use of `argument_type` and `result_type` from `hasher` in cuo default and arrow filter policies[/+]PointKernel commentedon Dec 10, 2024
I thought about mentioning this during the code review but didn’t want to come across as nitpicking. Instead of
cuCollections/include/cuco/detail/bloom_filter/arrow_filter_policy.cuh
Lines 84 to 85 in b8429d4
we could make the hasher a template type:
To use it, users can simply pass the hasher type without repeating the
Keytype again, e.g.auto p = arrow_filter_policy<Key, cuco::xxhash_32>{...};mhaseeb123 commentedon Dec 10, 2024
No worries about that. I am always for pursuing excellence and attention to the detail is how we all learn. 😄
I think this is a great idea. Let's do this. But we still would be using the member types (
argument_typeandresult_type) from the hasher which Bradley mentionedPointKernel commentedon Dec 10, 2024
Half-half. The
argument_typewill simply bekey_type (using key_type = Key). However, retainingresult_type(should behash_value_typeof the policy) is still desirable. The STL simplifies hashers by always usingstd::size_tas the return type, but this approach is suboptimal, especially in terms of performance and for GPUs. Such oversimplification does not fit our goals and IMO should be avoided.mhaseeb123 commentedon Dec 10, 2024
Agreed. Let's make the suggested change to
cuco::arrow_filter_policyand close this issue otherwise.[-][ENHANCEMENT]: Consider removing the use of `argument_type` and `result_type` from `hasher` in cuo default and arrow filter policies[/-][+][ENHANCEMENT]: Consider removing the use of `argument_type` and `result_type` from `hasher` in cuco `default_filter_policy`[/+]mhaseeb123 commentedon Dec 10, 2024
#654 removes these member types for the
arrow_filter_policy.