Skip to content

Commit b7d25bb

Browse files
committed
Update examples
1 parent 616e773 commit b7d25bb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/static_set/device_subsets_example.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ __global__ void insert(ref_type* set_refs)
8585
auto const idx = (blockDim.x * blockIdx.x + threadIdx.x) / cg_size;
8686

8787
auto raw_set_ref = *(set_refs + idx);
88-
auto insert_set_ref = raw_set_ref.with_operators(cuco::insert);
88+
auto insert_set_ref = raw_set_ref.rebind_operators(cuco::insert);
8989

9090
// Insert `N` elemtns into the set with CG insert
9191
for (int i = 0; i < N; i++) {
@@ -109,7 +109,7 @@ __global__ void find(ref_type* set_refs)
109109
auto const idx = (blockDim.x * blockIdx.x + threadIdx.x) / cg_size;
110110

111111
auto raw_set_ref = *(set_refs + idx);
112-
auto find_set_ref = raw_set_ref.with_operators(cuco::find);
112+
auto find_set_ref = raw_set_ref.rebind_operators(cuco::find);
113113

114114
// Result denoting if any of the inserted data is not found
115115
__shared__ int result;

examples/static_set/shared_memory_example.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ __global__ void shmem_set_kernel(typename SetRef::extent_type window_extent,
4747

4848
// The `set` object does not come with any functionality. We first have to transform it into an
4949
// object that supports the function we need (in this case `insert`).
50-
auto insert_ref = set.with_operators(cuco::insert);
50+
auto insert_ref = set.rebind_operators(cuco::insert);
5151

5252
// Each thread inserts its thread id into the set.
5353
typename SetRef::key_type const key = block.thread_rank();
@@ -61,7 +61,7 @@ __global__ void shmem_set_kernel(typename SetRef::extent_type window_extent,
6161
// a new non-owning object based on the `insert_ref` that supports `contains` but no longer
6262
// supports `insert`.
6363
// CAVEAT: concurrent use of `insert_ref` and `contains_ref` is undefined behavior.
64-
auto const contains_ref = insert_ref.with_operators(cuco::contains);
64+
auto const contains_ref = insert_ref.rebind_operators(cuco::contains);
6565

6666
// Check if all keys can be found
6767
if (not contains_ref.contains(key)) { printf("ERROR: Key %d not found\n", key); }

0 commit comments

Comments
 (0)