From 399c4d88e3c022650c90b1dc7839beb9063c9b1d Mon Sep 17 00:00:00 2001 From: Yunsong Wang Date: Mon, 16 Sep 2024 14:47:15 -0700 Subject: [PATCH] Update probing scheme to take tuple instead of cuco pair --- include/cuco/detail/probing_scheme/probing_scheme_impl.inl | 4 ++-- include/cuco/probing_scheme.cuh | 2 +- tests/static_multiset/custom_count_test.cu | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/cuco/detail/probing_scheme/probing_scheme_impl.inl b/include/cuco/detail/probing_scheme/probing_scheme_impl.inl index da1dc5dbd..ca39b2cb3 100644 --- a/include/cuco/detail/probing_scheme/probing_scheme_impl.inl +++ b/include/cuco/detail/probing_scheme/probing_scheme_impl.inl @@ -143,7 +143,7 @@ __host__ __device__ constexpr double_hashing::double_hashi template __host__ __device__ constexpr double_hashing::double_hashing( - cuco::pair const& hash) + cuda::std::tuple const& hash) : hash1_{hash.first}, hash2_{hash.second} { } @@ -156,7 +156,7 @@ __host__ __device__ constexpr auto double_hashing::rebind_ static_assert(cuco::is_tuple_like::value, "The given hasher must be a tuple-like object"); - auto const [hash1, hash2] = cuco::pair{hash}; + auto const [hash1, hash2] = cuda::std::tuple{hash}; using hash1_type = cuda::std::decay_t; using hash2_type = cuda::std::decay_t; return double_hashing{hash1, hash2}; diff --git a/include/cuco/probing_scheme.cuh b/include/cuco/probing_scheme.cuh index 4b77de7f5..4032daadb 100644 --- a/include/cuco/probing_scheme.cuh +++ b/include/cuco/probing_scheme.cuh @@ -143,7 +143,7 @@ class double_hashing : private detail::probing_scheme_base { * * @param hash Hasher tuple */ - __host__ __device__ constexpr double_hashing(cuco::pair const& hash); + __host__ __device__ constexpr double_hashing(cuda::std::tuple const& hash); /** *@brief Makes a copy of the current probing method with the given hasher diff --git a/tests/static_multiset/custom_count_test.cu b/tests/static_multiset/custom_count_test.cu index 69ce41da6..f5ade5eeb 100644 --- a/tests/static_multiset/custom_count_test.cu +++ b/tests/static_multiset/custom_count_test.cu @@ -63,7 +63,7 @@ void test_custom_count(Set& set, size_type num_keys) auto const hash = []() { if constexpr (cuco::is_double_hashing::value) { - return cuco::pair{custom_hash{}, custom_hash{}}; + return cuda::std::tuple{custom_hash{}, custom_hash{}}; } else { return custom_hash{}; }