Skip to content

Commit

Permalink
Add back deprecated with_key_eq to avoid breaking changes in libcudf
Browse files Browse the repository at this point in the history
  • Loading branch information
PointKernel committed Oct 2, 2024
1 parent 8c8590c commit d17d9af
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
14 changes: 14 additions & 0 deletions include/cuco/detail/static_set/static_set_ref.inl
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,20 @@ static_set_ref<Key, Scope, KeyEqual, ProbingScheme, StorageRef, Operators...>::r
this->storage_ref()};
}

template <typename Key,
cuda::thread_scope Scope,
typename KeyEqual,
typename ProbingScheme,
typename StorageRef,
typename... Operators>
template <typename NewKeyEqual>
__host__ __device__ constexpr auto
static_set_ref<Key, Scope, KeyEqual, ProbingScheme, StorageRef, Operators...>::with_key_eq(
NewKeyEqual const& key_equal) const noexcept
{
return this->rebind_key_eq(key_equal);
}

template <typename Key,
cuda::thread_scope Scope,
typename KeyEqual,
Expand Down
13 changes: 13 additions & 0 deletions include/cuco/static_set_ref.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,19 @@ class static_set_ref
[[nodiscard]] __host__ __device__ constexpr auto rebind_key_eq(
NewKeyEqual const& key_equal) const noexcept;

/**
* @brief Makes a copy of the current device reference with the given key comparator
*
* @tparam NewKeyEqual The new key equal type
*
* @param key_equal New key comparator
*
* @return Copy of the current device ref
*/
template <typename NewKeyEqual>
[[nodiscard]] __host__ __device__ constexpr auto with_key_eq(
NewKeyEqual const& key_equal) const noexcept;

/**
* @brief Makes a copy of the current device reference with the given hasher
*
Expand Down

0 comments on commit d17d9af

Please sign in to comment.