Skip to content

Commit

Permalink
Rename insert_pair as insert_element in common kernels (#367)
Browse files Browse the repository at this point in the history
A minor cleanup to rename variables in detail implementations.
  • Loading branch information
PointKernel authored Sep 14, 2023
1 parent 641c868 commit dcd5a99
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/cuco/detail/common_kernels.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ __global__ void insert_if_n(InputIterator first,

while (idx < n) {
if (pred(*(stencil + idx))) {
typename Ref::value_type const insert_pair{*(first + idx)};
typename Ref::value_type const insert_element{*(first + idx)};
if constexpr (CGSize == 1) {
if (ref.insert(insert_pair)) { thread_num_successes++; };
if (ref.insert(insert_element)) { thread_num_successes++; };
} else {
auto const tile =
cooperative_groups::tiled_partition<CGSize>(cooperative_groups::this_thread_block());
if (ref.insert(tile, insert_pair) && tile.thread_rank() == 0) { thread_num_successes++; };
if (ref.insert(tile, insert_element) && tile.thread_rank() == 0) { thread_num_successes++; }
}
}
idx += loop_stride;
Expand Down Expand Up @@ -134,13 +134,13 @@ __global__ void insert_if_n(

while (idx < n) {
if (pred(*(stencil + idx))) {
typename Ref::value_type const insert_pair{*(first + idx)};
typename Ref::value_type const insert_element{*(first + idx)};
if constexpr (CGSize == 1) {
ref.insert(insert_pair);
ref.insert(insert_element);
} else {
auto const tile =
cooperative_groups::tiled_partition<CGSize>(cooperative_groups::this_thread_block());
ref.insert(tile, insert_pair);
ref.insert(tile, insert_element);
}
}
idx += loop_stride;
Expand Down

0 comments on commit dcd5a99

Please sign in to comment.