From 78e21e7dc38b761c6a53cacc75775eb0f652e45a Mon Sep 17 00:00:00 2001 From: Yunsong Wang Date: Thu, 3 Oct 2024 12:13:36 -0700 Subject: [PATCH] Restore with_hash_function for static_set --- include/cuco/detail/static_set/static_set_ref.inl | 14 ++++++++++++++ include/cuco/static_set_ref.cuh | 12 ++++++++++++ 2 files changed, 26 insertions(+) diff --git a/include/cuco/detail/static_set/static_set_ref.inl b/include/cuco/detail/static_set/static_set_ref.inl index 0683848e6..192111e0a 100644 --- a/include/cuco/detail/static_set/static_set_ref.inl +++ b/include/cuco/detail/static_set/static_set_ref.inl @@ -336,6 +336,20 @@ static_set_ref::r this->storage_ref()}; } +template +template +__host__ __device__ constexpr auto +static_set_ref::with_hash_function( + NewHash const& hash) const +{ + return this->rebind_hash_function(hash); +} + template [[nodiscard]] __host__ __device__ constexpr auto rebind_hash_function(NewHash const& hash) const; + /** + * @brief Makes a copy of the current device reference with the given hasher + * + * @tparam NewHash The new hasher type + * + * @param hash New hasher + * + * @return Copy of the current device ref + */ + template + [[nodiscard]] __host__ __device__ constexpr auto with_hash_function(NewHash const& hash) const; + /** * @brief Makes a copy of the current device reference using non-owned memory *