Skip to content

Commit d17d9af

Browse files
committed
Add back deprecated with_key_eq to avoid breaking changes in libcudf
1 parent 8c8590c commit d17d9af

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

include/cuco/detail/static_set/static_set_ref.inl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,20 @@ static_set_ref<Key, Scope, KeyEqual, ProbingScheme, StorageRef, Operators...>::r
298298
this->storage_ref()};
299299
}
300300

301+
template <typename Key,
302+
cuda::thread_scope Scope,
303+
typename KeyEqual,
304+
typename ProbingScheme,
305+
typename StorageRef,
306+
typename... Operators>
307+
template <typename NewKeyEqual>
308+
__host__ __device__ constexpr auto
309+
static_set_ref<Key, Scope, KeyEqual, ProbingScheme, StorageRef, Operators...>::with_key_eq(
310+
NewKeyEqual const& key_equal) const noexcept
311+
{
312+
return this->rebind_key_eq(key_equal);
313+
}
314+
301315
template <typename Key,
302316
cuda::thread_scope Scope,
303317
typename KeyEqual,

include/cuco/static_set_ref.cuh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,19 @@ class static_set_ref
245245
[[nodiscard]] __host__ __device__ constexpr auto rebind_key_eq(
246246
NewKeyEqual const& key_equal) const noexcept;
247247

248+
/**
249+
* @brief Makes a copy of the current device reference with the given key comparator
250+
*
251+
* @tparam NewKeyEqual The new key equal type
252+
*
253+
* @param key_equal New key comparator
254+
*
255+
* @return Copy of the current device ref
256+
*/
257+
template <typename NewKeyEqual>
258+
[[nodiscard]] __host__ __device__ constexpr auto with_key_eq(
259+
NewKeyEqual const& key_equal) const noexcept;
260+
248261
/**
249262
* @brief Makes a copy of the current device reference with the given hasher
250263
*

0 commit comments

Comments
 (0)