@@ -372,7 +372,7 @@ class open_addressing_ref_impl {
372372 * @return True if the given element is successfully inserted
373373 */
374374 template <typename Value>
375- __device__ bool insert (Value const & value) noexcept
375+ __device__ bool insert (Value value) noexcept
376376 {
377377 static_assert (cg_size == 1 , " Non-CG operation is incompatible with the current probing scheme" );
378378
@@ -427,7 +427,7 @@ class open_addressing_ref_impl {
427427 */
428428 template <bool SupportsErase, typename Value>
429429 __device__ bool insert (cooperative_groups::thread_block_tile<cg_size> const & group,
430- Value const & value) noexcept
430+ Value value) noexcept
431431 {
432432 auto const val = this ->heterogeneous_value (value);
433433 auto const key = this ->extract_key (val);
@@ -512,7 +512,7 @@ class open_addressing_ref_impl {
512512 * insertion is successful or not.
513513 */
514514 template <typename Value>
515- __device__ cuda::std::pair<iterator, bool > insert_and_find (Value const & value) noexcept
515+ __device__ cuda::std::pair<iterator, bool > insert_and_find (Value value) noexcept
516516 {
517517 static_assert (cg_size == 1 , " Non-CG operation is incompatible with the current probing scheme" );
518518#if __CUDA_ARCH__ < 700
@@ -587,7 +587,7 @@ class open_addressing_ref_impl {
587587 */
588588 template <typename Value>
589589 __device__ cuda::std::pair<iterator, bool > insert_and_find (
590- cooperative_groups::thread_block_tile<cg_size> const & group, Value const & value) noexcept
590+ cooperative_groups::thread_block_tile<cg_size> const & group, Value value) noexcept
591591 {
592592#if __CUDA_ARCH__ < 700
593593 // Spinning to ensure that the write to the value part took place requires
@@ -678,12 +678,12 @@ class open_addressing_ref_impl {
678678 *
679679 * @tparam ProbeKey Input type which is convertible to 'key_type'
680680 *
681- * @param value The element to erase
681+ * @param key The element to erase
682682 *
683683 * @return True if the given element is successfully erased
684684 */
685685 template <typename ProbeKey>
686- __device__ bool erase (ProbeKey const & key) noexcept
686+ __device__ bool erase (ProbeKey key) noexcept
687687 {
688688 static_assert (cg_size == 1 , " Non-CG operation is incompatible with the current probing scheme" );
689689
@@ -723,13 +723,13 @@ class open_addressing_ref_impl {
723723 * @tparam ProbeKey Input type which is convertible to 'key_type'
724724 *
725725 * @param group The Cooperative Group used to perform group erase
726- * @param value The element to erase
726+ * @param key The element to erase
727727 *
728728 * @return True if the given element is successfully erased
729729 */
730730 template <typename ProbeKey>
731731 __device__ bool erase (cooperative_groups::thread_block_tile<cg_size> const & group,
732- ProbeKey const & key) noexcept
732+ ProbeKey key) noexcept
733733 {
734734 auto probing_iter =
735735 probing_scheme_.template make_iterator <bucket_size>(group, key, storage_ref_.extent ());
@@ -787,7 +787,7 @@ class open_addressing_ref_impl {
787787 * @return A boolean indicating whether the probe key is present
788788 */
789789 template <typename ProbeKey>
790- [[nodiscard]] __device__ bool contains (ProbeKey const & key) const noexcept
790+ [[nodiscard]] __device__ bool contains (ProbeKey key) const noexcept
791791 {
792792 static_assert (cg_size == 1 , " Non-CG operation is incompatible with the current probing scheme" );
793793 auto probing_iter =
@@ -826,7 +826,7 @@ class open_addressing_ref_impl {
826826 */
827827 template <typename ProbeKey>
828828 [[nodiscard]] __device__ bool contains (
829- cooperative_groups::thread_block_tile<cg_size> const & group, ProbeKey const & key) const noexcept
829+ cooperative_groups::thread_block_tile<cg_size> const & group, ProbeKey key) const noexcept
830830 {
831831 auto probing_iter =
832832 probing_scheme_.template make_iterator <bucket_size>(group, key, storage_ref_.extent ());
@@ -866,7 +866,7 @@ class open_addressing_ref_impl {
866866 * @return An iterator to the position at which the equivalent key is stored
867867 */
868868 template <typename ProbeKey>
869- [[nodiscard]] __device__ iterator find (ProbeKey const & key) const noexcept
869+ [[nodiscard]] __device__ iterator find (ProbeKey key) const noexcept
870870 {
871871 static_assert (cg_size == 1 , " Non-CG operation is incompatible with the current probing scheme" );
872872 auto probing_iter =
@@ -908,8 +908,8 @@ class open_addressing_ref_impl {
908908 * @return An iterator to the position at which the equivalent key is stored
909909 */
910910 template <typename ProbeKey>
911- [[nodiscard]] __device__ iterator find (
912- cooperative_groups::thread_block_tile<cg_size> const & group, ProbeKey const & key) const noexcept
911+ [[nodiscard]] __device__ iterator
912+ find ( cooperative_groups::thread_block_tile<cg_size> const & group, ProbeKey key) const noexcept
913913 {
914914 auto probing_iter =
915915 probing_scheme_.template make_iterator <bucket_size>(group, key, storage_ref_.extent ());
@@ -957,7 +957,7 @@ class open_addressing_ref_impl {
957957 * @return Number of occurrences found by the current thread
958958 */
959959 template <typename ProbeKey>
960- [[nodiscard]] __device__ size_type count (ProbeKey const & key) const noexcept
960+ [[nodiscard]] __device__ size_type count (ProbeKey key) const noexcept
961961 {
962962 if constexpr (not allows_duplicates) {
963963 return static_cast <size_type>(this ->contains (key));
@@ -1004,8 +1004,8 @@ class open_addressing_ref_impl {
10041004 * @return Number of occurrences found by the current thread
10051005 */
10061006 template <typename ProbeKey>
1007- [[nodiscard]] __device__ size_type count (
1008- cooperative_groups::thread_block_tile<cg_size> const & group, ProbeKey const & key) const noexcept
1007+ [[nodiscard]] __device__ size_type
1008+ count ( cooperative_groups::thread_block_tile<cg_size> const & group, ProbeKey key) const noexcept
10091009 {
10101010 auto probing_iter =
10111011 probing_scheme_.template make_iterator <bucket_size>(group, key, storage_ref_.extent ());
@@ -1360,7 +1360,7 @@ class open_addressing_ref_impl {
13601360 * @param callback_op Function to apply to every matched slot
13611361 */
13621362 template <class ProbeKey , class CallbackOp >
1363- __device__ void for_each (ProbeKey const & key, CallbackOp&& callback_op) const noexcept
1363+ __device__ void for_each (ProbeKey key, CallbackOp&& callback_op) const noexcept
13641364 {
13651365 static_assert (cg_size == 1 , " Non-CG operation is incompatible with the current probing scheme" );
13661366 auto probing_iter =
@@ -1410,7 +1410,7 @@ class open_addressing_ref_impl {
14101410 */
14111411 template <class ProbeKey , class CallbackOp >
14121412 __device__ void for_each (cooperative_groups::thread_block_tile<cg_size> const & group,
1413- ProbeKey const & key,
1413+ ProbeKey key,
14141414 CallbackOp&& callback_op) const noexcept
14151415 {
14161416 auto probing_iter =
@@ -1474,7 +1474,7 @@ class open_addressing_ref_impl {
14741474 */
14751475 template <class ProbeKey , class CallbackOp , class SyncOp >
14761476 __device__ void for_each (cooperative_groups::thread_block_tile<cg_size> const & group,
1477- ProbeKey const & key,
1477+ ProbeKey key,
14781478 CallbackOp&& callback_op,
14791479 SyncOp&& sync_op) const noexcept
14801480 {
@@ -1534,7 +1534,7 @@ class open_addressing_ref_impl {
15341534 * @return The key
15351535 */
15361536 template <typename Value>
1537- [[nodiscard]] __host__ __device__ constexpr auto extract_key (Value const & value) const noexcept
1537+ [[nodiscard]] __host__ __device__ constexpr auto extract_key (Value value) const noexcept
15381538 {
15391539 if constexpr (has_payload) {
15401540 return thrust::raw_reference_cast (value).first ;
@@ -1555,8 +1555,7 @@ class open_addressing_ref_impl {
15551555 * @return The payload
15561556 */
15571557 template <typename Value, typename Enable = cuda::std::enable_if_t <has_payload and sizeof (Value)>>
1558- [[nodiscard]] __host__ __device__ constexpr auto extract_payload (
1559- Value const & value) const noexcept
1558+ [[nodiscard]] __host__ __device__ constexpr auto extract_payload (Value value) const noexcept
15601559 {
15611560 return thrust::raw_reference_cast (value).second ;
15621561 }
@@ -1571,7 +1570,7 @@ class open_addressing_ref_impl {
15711570 * @return The converted object
15721571 */
15731572 template <typename T>
1574- [[nodiscard]] __device__ constexpr value_type native_value (T const & value) const noexcept
1573+ [[nodiscard]] __device__ constexpr value_type native_value (T value) const noexcept
15751574 {
15761575 if constexpr (has_payload) {
15771576 return {static_cast <key_type>(this ->extract_key (value)), this ->extract_payload (value)};
@@ -1591,7 +1590,7 @@ class open_addressing_ref_impl {
15911590 * @return The converted object
15921591 */
15931592 template <typename T>
1594- [[nodiscard]] __device__ constexpr auto heterogeneous_value (T const & value) const noexcept
1593+ [[nodiscard]] __device__ constexpr auto heterogeneous_value (T value) const noexcept
15951594 {
15961595 if constexpr (has_payload and not cuda::std::is_same_v<T, value_type>) {
15971596 using mapped_type = decltype (this ->empty_value_sentinel ());
@@ -1613,7 +1612,7 @@ class open_addressing_ref_impl {
16131612 *
16141613 * @return The sentinel value used to represent an erased slot
16151614 */
1616- [[nodiscard]] __device__ constexpr value_type const erased_slot_sentinel () const noexcept
1615+ [[nodiscard]] __device__ constexpr value_type erased_slot_sentinel () const noexcept
16171616 {
16181617 if constexpr (has_payload) {
16191618 return cuco::pair{this ->erased_key_sentinel (), this ->empty_value_sentinel ()};
@@ -1674,8 +1673,8 @@ class open_addressing_ref_impl {
16741673 */
16751674 template <typename Value>
16761675 [[nodiscard]] __device__ constexpr insert_result back_to_back_cas (value_type* address,
1677- value_type const & expected,
1678- Value const & desired) noexcept
1676+ value_type expected,
1677+ Value desired) noexcept
16791678 {
16801679 using mapped_type = cuda::std::decay_t <decltype (this ->empty_value_sentinel ())>;
16811680
@@ -1725,8 +1724,9 @@ class open_addressing_ref_impl {
17251724 * @return Result of this operation, i.e., success/continue/duplicate
17261725 */
17271726 template <typename Value>
1728- [[nodiscard]] __device__ constexpr insert_result cas_dependent_write (
1729- value_type* address, value_type const & expected, Value const & desired) noexcept
1727+ [[nodiscard]] __device__ constexpr insert_result cas_dependent_write (value_type* address,
1728+ value_type expected,
1729+ Value desired) noexcept
17301730 {
17311731 using mapped_type = cuda::std::decay_t <decltype (this ->empty_value_sentinel ())>;
17321732
@@ -1767,8 +1767,8 @@ class open_addressing_ref_impl {
17671767 */
17681768 template <typename Value>
17691769 [[nodiscard]] __device__ insert_result attempt_insert (value_type* address,
1770- value_type const & expected,
1771- Value const & desired) noexcept
1770+ value_type expected,
1771+ Value desired) noexcept
17721772 {
17731773 if constexpr (sizeof (value_type) <= 8 ) {
17741774 return packed_cas (address, expected, desired);
@@ -1800,8 +1800,8 @@ class open_addressing_ref_impl {
18001800 */
18011801 template <typename Value>
18021802 [[nodiscard]] __device__ insert_result attempt_insert_stable (value_type* address,
1803- value_type const & expected,
1804- Value const & desired) noexcept
1803+ value_type expected,
1804+ Value desired) noexcept
18051805 {
18061806 if constexpr (sizeof (value_type) <= 8 ) {
18071807 return packed_cas (address, expected, desired);
@@ -1822,7 +1822,7 @@ class open_addressing_ref_impl {
18221822 * @param sentinel The slot sentinel value
18231823 */
18241824 template <typename T>
1825- __device__ void wait_for_payload (T& slot, T const & sentinel) const noexcept
1825+ __device__ void wait_for_payload (T& slot, T sentinel) const noexcept
18261826 {
18271827 auto ref = cuda::atomic_ref<T, Scope>{slot};
18281828 T current;
0 commit comments