Skip to content

Commit 3ada9bc

Browse files
committed
Update static_map kernels
1 parent 0cb59a6 commit 3ada9bc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

include/cuco/detail/static_map/kernels.cuh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ CUCO_KERNEL __launch_bounds__(BlockSize) void insert_or_assign(InputIt first,
5656
auto idx = cuco::detail::global_thread_id() / CGSize;
5757

5858
while (idx < n) {
59-
typename cuda::std::iterator_traits<InputIt>::value_type const& insert_pair = *(first + idx);
59+
typename cuda::std::iterator_traits<InputIt>::value_type const insert_pair = *(first + idx);
6060
if constexpr (CGSize == 1) {
6161
ref.insert_or_assign(insert_pair);
6262
} else {
@@ -109,8 +109,8 @@ __global__ void insert_or_apply(
109109
auto idx = cuco::detail::global_thread_id() / CGSize;
110110

111111
while (idx < n) {
112-
using value_type = typename cuda::std::iterator_traits<InputIt>::value_type;
113-
value_type const& insert_pair = *(first + idx);
112+
using value_type = typename cuda::std::iterator_traits<InputIt>::value_type;
113+
value_type const insert_pair = *(first + idx);
114114
if constexpr (CGSize == 1) {
115115
if constexpr (HasInit) {
116116
ref.insert_or_apply(insert_pair, init, op);
@@ -215,7 +215,7 @@ CUCO_KERNEL __launch_bounds__(BlockSize) void insert_or_apply_shmem(
215215
int32_t warp_cardinality = 0;
216216
// insert-or-apply into the shared map first
217217
if (idx < n) {
218-
value_type const& insert_pair = *(first + idx);
218+
value_type const insert_pair = *(first + idx);
219219
if constexpr (HasInit) {
220220
inserted = shared_map_ref.insert_or_apply(insert_pair, init, op);
221221
} else {
@@ -252,7 +252,7 @@ CUCO_KERNEL __launch_bounds__(BlockSize) void insert_or_apply_shmem(
252252
if (block_cardinality > BlockSize) {
253253
idx += loop_stride;
254254
while (idx < n) {
255-
value_type const& insert_pair = *(first + idx);
255+
value_type const insert_pair = *(first + idx);
256256
if constexpr (HasInit) {
257257
ref.insert_or_apply(insert_pair, init, op);
258258
} else {

0 commit comments

Comments
 (0)