Skip to content

Commit 616e773

Browse files
committed
Replace deprecated with_operators with rebind_operators
1 parent 24b1d8c commit 616e773

File tree

10 files changed

+6
-155
lines changed

10 files changed

+6
-155
lines changed

include/cuco/detail/static_map/static_map_ref.inl

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -288,27 +288,6 @@ static_map_ref<Key, T, Scope, KeyEqual, ProbingScheme, StorageRef, Operators...>
288288
return impl_.erased_key_sentinel();
289289
}
290290

291-
template <typename Key,
292-
typename T,
293-
cuda::thread_scope Scope,
294-
typename KeyEqual,
295-
typename ProbingScheme,
296-
typename StorageRef,
297-
typename... Operators>
298-
template <typename... NewOperators>
299-
__host__ __device__ constexpr auto
300-
static_map_ref<Key, T, Scope, KeyEqual, ProbingScheme, StorageRef, Operators...>::with_operators(
301-
NewOperators...) const noexcept
302-
{
303-
return static_map_ref<Key, T, Scope, KeyEqual, ProbingScheme, StorageRef, NewOperators...>{
304-
cuco::empty_key<Key>{this->empty_key_sentinel()},
305-
cuco::empty_value<T>{this->empty_value_sentinel()},
306-
this->key_eq(),
307-
this->probing_scheme(),
308-
{},
309-
this->storage_ref()};
310-
}
311-
312291
template <typename Key,
313292
typename T,
314293
cuda::thread_scope Scope,

include/cuco/detail/static_multimap/static_multimap_ref.inl

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -287,32 +287,6 @@ static_multimap_ref<Key, T, Scope, KeyEqual, ProbingScheme, StorageRef, Operator
287287
return impl_.erased_key_sentinel();
288288
}
289289

290-
template <typename Key,
291-
typename T,
292-
cuda::thread_scope Scope,
293-
typename KeyEqual,
294-
typename ProbingScheme,
295-
typename StorageRef,
296-
typename... Operators>
297-
template <typename... NewOperators>
298-
__host__ __device__ auto constexpr static_multimap_ref<
299-
Key,
300-
T,
301-
Scope,
302-
KeyEqual,
303-
ProbingScheme,
304-
StorageRef,
305-
Operators...>::with_operators(NewOperators...) const noexcept
306-
{
307-
return static_multimap_ref<Key, T, Scope, KeyEqual, ProbingScheme, StorageRef, NewOperators...>{
308-
cuco::empty_key<Key>{this->empty_key_sentinel()},
309-
cuco::empty_value<T>{this->empty_value_sentinel()},
310-
this->key_eq(),
311-
this->probing_scheme(),
312-
{},
313-
impl_.storage_ref()};
314-
}
315-
316290
template <typename Key,
317291
typename T,
318292
cuda::thread_scope Scope,

include/cuco/detail/static_multiset/static_multiset_ref.inl

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -244,25 +244,6 @@ static_multiset_ref<Key, Scope, KeyEqual, ProbingScheme, StorageRef, Operators..
244244
return this->impl_.end();
245245
}
246246

247-
template <typename Key,
248-
cuda::thread_scope Scope,
249-
typename KeyEqual,
250-
typename ProbingScheme,
251-
typename StorageRef,
252-
typename... Operators>
253-
template <typename... NewOperators>
254-
__host__ __device__ constexpr auto
255-
static_multiset_ref<Key, Scope, KeyEqual, ProbingScheme, StorageRef, Operators...>::with_operators(
256-
NewOperators...) const noexcept
257-
{
258-
return static_multiset_ref<Key, Scope, KeyEqual, ProbingScheme, StorageRef, NewOperators...>{
259-
cuco::empty_key<Key>{this->empty_key_sentinel()},
260-
this->key_eq(),
261-
this->probing_scheme(),
262-
{},
263-
this->storage_ref()};
264-
}
265-
266247
template <typename Key,
267248
cuda::thread_scope Scope,
268249
typename KeyEqual,

include/cuco/detail/static_set/static_set_ref.inl

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -241,25 +241,6 @@ static_set_ref<Key, Scope, KeyEqual, ProbingScheme, StorageRef, Operators...>::e
241241
return impl_.erased_key_sentinel();
242242
}
243243

244-
template <typename Key,
245-
cuda::thread_scope Scope,
246-
typename KeyEqual,
247-
typename ProbingScheme,
248-
typename StorageRef,
249-
typename... Operators>
250-
template <typename... NewOperators>
251-
__host__ __device__ constexpr auto
252-
static_set_ref<Key, Scope, KeyEqual, ProbingScheme, StorageRef, Operators...>::with_operators(
253-
NewOperators...) const noexcept
254-
{
255-
return static_set_ref<Key, Scope, KeyEqual, ProbingScheme, StorageRef, NewOperators...>{
256-
cuco::empty_key<Key>{this->empty_key_sentinel()},
257-
this->key_eq(),
258-
this->probing_scheme(),
259-
{},
260-
this->storage_ref()};
261-
}
262-
263244
template <typename Key,
264245
cuda::thread_scope Scope,
265246
typename KeyEqual,

include/cuco/static_map_ref.cuh

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -226,22 +226,6 @@ class static_map_ref
226226
*/
227227
[[nodiscard]] __host__ __device__ constexpr auto probing_scheme() const noexcept;
228228

229-
/**
230-
* @brief Creates a reference with new operators from the current object
231-
*
232-
* @warning Using two or more reference objects to the same container but with
233-
* a different operator set at the same time results in undefined behavior.
234-
*
235-
* @tparam NewOperators List of `cuco::op::*_tag` types
236-
*
237-
* @param ops List of operators, e.g., `cuco::insert`
238-
*
239-
* @return `*this` with `NewOperators...`
240-
*/
241-
template <typename... NewOperators>
242-
[[nodiscard]] __host__ __device__ constexpr auto with_operators(
243-
NewOperators... ops) const noexcept;
244-
245229
/**
246230
* @brief Creates a copy of the current non-owning reference using the given operators
247231
*

include/cuco/static_multimap_ref.cuh

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -225,22 +225,6 @@ class static_multimap_ref
225225
*/
226226
[[nodiscard]] __host__ __device__ constexpr auto probing_scheme() const noexcept;
227227

228-
/**
229-
* @brief Creates a reference with new operators from the current object
230-
*
231-
* @warning Using two or more reference objects to the same container but with
232-
* a different operator set at the same time results in undefined behavior.
233-
*
234-
* @tparam NewOperators List of `cuco::op::*_tag` types
235-
*
236-
* @param ops List of operators, e.g., `cuco::insert`
237-
*
238-
* @return `*this` with `NewOperators...`
239-
*/
240-
template <typename... NewOperators>
241-
[[nodiscard]] __host__ __device__ constexpr auto with_operators(
242-
NewOperators... ops) const noexcept;
243-
244228
/**
245229
* @brief Creates a copy of the current non-owning reference using the given operators
246230
*

include/cuco/static_multiset_ref.cuh

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -205,22 +205,6 @@ class static_multiset_ref
205205
*/
206206
[[nodiscard]] __host__ __device__ constexpr auto probing_scheme() const noexcept;
207207

208-
/**
209-
* @brief Creates a reference with new operators from the current object
210-
*
211-
* @warning Using two or more reference objects to the same container but with
212-
* a different operator set at the same time results in undefined behavior.
213-
*
214-
* @tparam NewOperators List of `cuco::op::*_tag` types
215-
*
216-
* @param ops List of operators, e.g., `cuco::insert`
217-
*
218-
* @return `*this` with `NewOperators...`
219-
*/
220-
template <typename... NewOperators>
221-
[[nodiscard]] __host__ __device__ constexpr auto with_operators(
222-
NewOperators... ops) const noexcept;
223-
224208
/**
225209
* @brief Creates a copy of the current non-owning reference using the given operators
226210
*

include/cuco/static_set_ref.cuh

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -203,22 +203,6 @@ class static_set_ref
203203
*/
204204
[[nodiscard]] __host__ __device__ constexpr auto probing_scheme() const noexcept;
205205

206-
/**
207-
* @brief Creates a reference with new operators from the current object
208-
*
209-
* @warning Using two or more reference objects to the same container but with
210-
* a different operator set at the same time results in undefined behavior.
211-
*
212-
* @tparam NewOperators List of `cuco::op::*_tag` types
213-
*
214-
* @param ops List of operators, e.g., `cuco::insert`
215-
*
216-
* @return `*this` with `NewOperators...`
217-
*/
218-
template <typename... NewOperators>
219-
[[nodiscard]] __host__ __device__ constexpr auto with_operators(
220-
NewOperators... ops) const noexcept;
221-
222206
/**
223207
* @brief Creates a copy of the current non-owning reference using the given operators
224208
*

tests/static_map/shared_memory_test.cu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ __global__ void shared_memory_test_kernel(Ref* maps,
4646

4747
auto g = cuco::test::cg::this_thread_block();
4848
auto insert_ref = maps[map_id].make_copy(g, sm_buffer, cuco::thread_scope_block);
49-
auto find_ref = insert_ref.with_operators(cuco::op::find);
49+
auto find_ref = insert_ref.rebind_operators(cuco::op::find);
5050

5151
for (int i = g.thread_rank(); i < number_of_elements; i += g.size()) {
5252
auto found_pair_it = find_ref.find(insterted_keys[offset + i]);
@@ -196,11 +196,11 @@ __global__ void shared_memory_hash_table_kernel(bool* key_found)
196196
auto const rank = block.thread_rank();
197197

198198
// insert {thread_rank, thread_rank} for each thread in thread-block
199-
auto insert_ref = raw_ref.with_operators(cuco::op::insert);
199+
auto insert_ref = raw_ref.rebind_operators(cuco::op::insert);
200200
insert_ref.insert(slot_type{rank, rank});
201201
block.sync();
202202

203-
auto find_ref = insert_ref.with_operators(cuco::op::find);
203+
auto find_ref = insert_ref.rebind_operators(cuco::op::find);
204204
auto const retrieved_pair = find_ref.find(rank);
205205
block.sync();
206206

tests/static_set/shared_memory_test.cu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ __global__ void shared_memory_test_kernel(Ref* sets,
4545

4646
auto g = cuco::test::cg::this_thread_block();
4747
auto insert_ref = sets[set_id].make_copy(g, sm_buffer, cuco::thread_scope_block);
48-
auto find_ref = insert_ref.with_operators(cuco::op::find);
48+
auto find_ref = insert_ref.rebind_operators(cuco::op::find);
4949

5050
for (int i = g.thread_rank(); i < number_of_elements; i += g.size()) {
5151
auto found_it = find_ref.find(insterted_keys[offset + i]);
@@ -176,11 +176,11 @@ __global__ void shared_memory_hash_set_kernel(bool* key_found)
176176
auto const rank = block.thread_rank();
177177

178178
// insert {thread_rank, thread_rank} for each thread in thread-block
179-
auto insert_ref = raw_ref.with_operators(cuco::op::insert);
179+
auto insert_ref = raw_ref.rebind_operators(cuco::op::insert);
180180
insert_ref.insert(rank);
181181
block.sync();
182182

183-
auto find_ref = insert_ref.with_operators(cuco::op::find);
183+
auto find_ref = insert_ref.rebind_operators(cuco::op::find);
184184
auto const retrieved_it = find_ref.find(rank);
185185
block.sync();
186186

0 commit comments

Comments
 (0)