@@ -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
@@ -428,7 +428,7 @@ class open_addressing_ref_impl {
428428 */
429429 template <bool SupportsErase, typename Value, typename ParentCG>
430430 __device__ bool insert (cooperative_groups::thread_block_tile<cg_size, ParentCG> group,
431- Value const & value) noexcept
431+ Value value) noexcept
432432 {
433433 auto const val = this ->heterogeneous_value (value);
434434 auto const key = this ->extract_key (val);
@@ -513,7 +513,7 @@ class open_addressing_ref_impl {
513513 * insertion is successful or not.
514514 */
515515 template <typename Value>
516- __device__ cuda::std::pair<iterator, bool > insert_and_find (Value const & value) noexcept
516+ __device__ cuda::std::pair<iterator, bool > insert_and_find (Value value) noexcept
517517 {
518518 static_assert (cg_size == 1 , " Non-CG operation is incompatible with the current probing scheme" );
519519#if __CUDA_ARCH__ < 700
@@ -589,7 +589,7 @@ class open_addressing_ref_impl {
589589 */
590590 template <typename Value, typename ParentCG>
591591 __device__ cuda::std::pair<iterator, bool > insert_and_find (
592- cooperative_groups::thread_block_tile<cg_size, ParentCG> group, Value const & value) noexcept
592+ cooperative_groups::thread_block_tile<cg_size, ParentCG> group, Value value) noexcept
593593 {
594594#if __CUDA_ARCH__ < 700
595595 // Spinning to ensure that the write to the value part took place requires
@@ -680,12 +680,12 @@ class open_addressing_ref_impl {
680680 *
681681 * @tparam ProbeKey Input type which is convertible to 'key_type'
682682 *
683- * @param value The element to erase
683+ * @param key The element to erase
684684 *
685685 * @return True if the given element is successfully erased
686686 */
687687 template <typename ProbeKey>
688- __device__ bool erase (ProbeKey const & key) noexcept
688+ __device__ bool erase (ProbeKey key) noexcept
689689 {
690690 static_assert (cg_size == 1 , " Non-CG operation is incompatible with the current probing scheme" );
691691
@@ -726,13 +726,13 @@ class open_addressing_ref_impl {
726726 * @tparam ParentCG Type of parent Cooperative Group
727727 *
728728 * @param group The Cooperative Group used to perform group erase
729- * @param value The element to erase
729+ * @param key The element to erase
730730 *
731731 * @return True if the given element is successfully erased
732732 */
733733 template <typename ProbeKey, typename ParentCG>
734734 __device__ bool erase (cooperative_groups::thread_block_tile<cg_size, ParentCG> group,
735- ProbeKey const & key) noexcept
735+ ProbeKey key) noexcept
736736 {
737737 auto probing_iter =
738738 probing_scheme_.template make_iterator <bucket_size>(group, key, storage_ref_.extent ());
@@ -790,7 +790,7 @@ class open_addressing_ref_impl {
790790 * @return A boolean indicating whether the probe key is present
791791 */
792792 template <typename ProbeKey>
793- [[nodiscard]] __device__ bool contains (ProbeKey const & key) const noexcept
793+ [[nodiscard]] __device__ bool contains (ProbeKey key) const noexcept
794794 {
795795 static_assert (cg_size == 1 , " Non-CG operation is incompatible with the current probing scheme" );
796796 auto probing_iter =
@@ -830,8 +830,7 @@ class open_addressing_ref_impl {
830830 */
831831 template <typename ProbeKey, typename ParentCG>
832832 [[nodiscard]] __device__ bool contains (
833- cooperative_groups::thread_block_tile<cg_size, ParentCG> group,
834- ProbeKey const & key) const noexcept
833+ cooperative_groups::thread_block_tile<cg_size, ParentCG> group, ProbeKey key) const noexcept
835834 {
836835 auto probing_iter =
837836 probing_scheme_.template make_iterator <bucket_size>(group, key, storage_ref_.extent ());
@@ -871,7 +870,7 @@ class open_addressing_ref_impl {
871870 * @return An iterator to the position at which the equivalent key is stored
872871 */
873872 template <typename ProbeKey>
874- [[nodiscard]] __device__ iterator find (ProbeKey const & key) const noexcept
873+ [[nodiscard]] __device__ iterator find (ProbeKey key) const noexcept
875874 {
876875 static_assert (cg_size == 1 , " Non-CG operation is incompatible with the current probing scheme" );
877876 auto probing_iter =
@@ -915,8 +914,7 @@ class open_addressing_ref_impl {
915914 */
916915 template <typename ProbeKey, typename ParentCG>
917916 [[nodiscard]] __device__ iterator
918- find (cooperative_groups::thread_block_tile<cg_size, ParentCG> group,
919- ProbeKey const & key) const noexcept
917+ find (cooperative_groups::thread_block_tile<cg_size, ParentCG> group, ProbeKey key) const noexcept
920918 {
921919 auto probing_iter =
922920 probing_scheme_.template make_iterator <bucket_size>(group, key, storage_ref_.extent ());
@@ -964,7 +962,7 @@ class open_addressing_ref_impl {
964962 * @return Number of occurrences found by the current thread
965963 */
966964 template <typename ProbeKey>
967- [[nodiscard]] __device__ size_type count (ProbeKey const & key) const noexcept
965+ [[nodiscard]] __device__ size_type count (ProbeKey key) const noexcept
968966 {
969967 if constexpr (not allows_duplicates) {
970968 return static_cast <size_type>(this ->contains (key));
@@ -1013,8 +1011,7 @@ class open_addressing_ref_impl {
10131011 */
10141012 template <typename ProbeKey, typename ParentCG>
10151013 [[nodiscard]] __device__ size_type
1016- count (cooperative_groups::thread_block_tile<cg_size, ParentCG> group,
1017- ProbeKey const & key) const noexcept
1014+ count (cooperative_groups::thread_block_tile<cg_size, ParentCG> group, ProbeKey key) const noexcept
10181015 {
10191016 auto probing_iter =
10201017 probing_scheme_.template make_iterator <bucket_size>(group, key, storage_ref_.extent ());
@@ -1369,7 +1366,7 @@ class open_addressing_ref_impl {
13691366 * @param callback_op Function to apply to every matched slot
13701367 */
13711368 template <class ProbeKey , class CallbackOp >
1372- __device__ void for_each (ProbeKey const & key, CallbackOp&& callback_op) const noexcept
1369+ __device__ void for_each (ProbeKey key, CallbackOp&& callback_op) const noexcept
13731370 {
13741371 static_assert (cg_size == 1 , " Non-CG operation is incompatible with the current probing scheme" );
13751372 auto probing_iter =
@@ -1420,7 +1417,7 @@ class open_addressing_ref_impl {
14201417 */
14211418 template <class ProbeKey , class CallbackOp , typename ParentCG>
14221419 __device__ void for_each (cooperative_groups::thread_block_tile<cg_size, ParentCG> group,
1423- ProbeKey const & key,
1420+ ProbeKey key,
14241421 CallbackOp&& callback_op) const noexcept
14251422 {
14261423 auto probing_iter =
@@ -1485,7 +1482,7 @@ class open_addressing_ref_impl {
14851482 */
14861483 template <class ProbeKey , class CallbackOp , class SyncOp , typename ParentCG>
14871484 __device__ void for_each (cooperative_groups::thread_block_tile<cg_size, ParentCG> group,
1488- ProbeKey const & key,
1485+ ProbeKey key,
14891486 CallbackOp&& callback_op,
14901487 SyncOp&& sync_op) const noexcept
14911488 {
@@ -1545,7 +1542,7 @@ class open_addressing_ref_impl {
15451542 * @return The key
15461543 */
15471544 template <typename Value>
1548- [[nodiscard]] __host__ __device__ constexpr auto extract_key (Value const & value) const noexcept
1545+ [[nodiscard]] __host__ __device__ constexpr auto extract_key (Value value) const noexcept
15491546 {
15501547 if constexpr (has_payload) {
15511548 return thrust::raw_reference_cast (value).first ;
@@ -1566,8 +1563,7 @@ class open_addressing_ref_impl {
15661563 * @return The payload
15671564 */
15681565 template <typename Value, typename Enable = cuda::std::enable_if_t <has_payload and sizeof (Value)>>
1569- [[nodiscard]] __host__ __device__ constexpr auto extract_payload (
1570- Value const & value) const noexcept
1566+ [[nodiscard]] __host__ __device__ constexpr auto extract_payload (Value value) const noexcept
15711567 {
15721568 return thrust::raw_reference_cast (value).second ;
15731569 }
@@ -1582,7 +1578,7 @@ class open_addressing_ref_impl {
15821578 * @return The converted object
15831579 */
15841580 template <typename T>
1585- [[nodiscard]] __device__ constexpr value_type native_value (T const & value) const noexcept
1581+ [[nodiscard]] __device__ constexpr value_type native_value (T value) const noexcept
15861582 {
15871583 if constexpr (has_payload) {
15881584 return {static_cast <key_type>(this ->extract_key (value)), this ->extract_payload (value)};
@@ -1602,7 +1598,7 @@ class open_addressing_ref_impl {
16021598 * @return The converted object
16031599 */
16041600 template <typename T>
1605- [[nodiscard]] __device__ constexpr auto heterogeneous_value (T const & value) const noexcept
1601+ [[nodiscard]] __device__ constexpr auto heterogeneous_value (T value) const noexcept
16061602 {
16071603 if constexpr (has_payload and not cuda::std::is_same_v<T, value_type>) {
16081604 using mapped_type = decltype (this ->empty_value_sentinel ());
@@ -1624,7 +1620,7 @@ class open_addressing_ref_impl {
16241620 *
16251621 * @return The sentinel value used to represent an erased slot
16261622 */
1627- [[nodiscard]] __device__ constexpr value_type const erased_slot_sentinel () const noexcept
1623+ [[nodiscard]] __device__ constexpr value_type erased_slot_sentinel () const noexcept
16281624 {
16291625 if constexpr (has_payload) {
16301626 return cuco::pair{this ->erased_key_sentinel (), this ->empty_value_sentinel ()};
@@ -1685,8 +1681,8 @@ class open_addressing_ref_impl {
16851681 */
16861682 template <typename Value>
16871683 [[nodiscard]] __device__ constexpr insert_result back_to_back_cas (value_type* address,
1688- value_type const & expected,
1689- Value const & desired) noexcept
1684+ value_type expected,
1685+ Value desired) noexcept
16901686 {
16911687 using mapped_type = cuda::std::decay_t <decltype (this ->empty_value_sentinel ())>;
16921688
@@ -1736,8 +1732,9 @@ class open_addressing_ref_impl {
17361732 * @return Result of this operation, i.e., success/continue/duplicate
17371733 */
17381734 template <typename Value>
1739- [[nodiscard]] __device__ constexpr insert_result cas_dependent_write (
1740- value_type* address, value_type const & expected, Value const & desired) noexcept
1735+ [[nodiscard]] __device__ constexpr insert_result cas_dependent_write (value_type* address,
1736+ value_type expected,
1737+ Value desired) noexcept
17411738 {
17421739 using mapped_type = cuda::std::decay_t <decltype (this ->empty_value_sentinel ())>;
17431740
@@ -1778,8 +1775,8 @@ class open_addressing_ref_impl {
17781775 */
17791776 template <typename Value>
17801777 [[nodiscard]] __device__ insert_result attempt_insert (value_type* address,
1781- value_type const & expected,
1782- Value const & desired) noexcept
1778+ value_type expected,
1779+ Value desired) noexcept
17831780 {
17841781 if constexpr (sizeof (value_type) <= 8 ) {
17851782 return packed_cas (address, expected, desired);
@@ -1811,8 +1808,8 @@ class open_addressing_ref_impl {
18111808 */
18121809 template <typename Value>
18131810 [[nodiscard]] __device__ insert_result attempt_insert_stable (value_type* address,
1814- value_type const & expected,
1815- Value const & desired) noexcept
1811+ value_type expected,
1812+ Value desired) noexcept
18161813 {
18171814 if constexpr (sizeof (value_type) <= 8 ) {
18181815 return packed_cas (address, expected, desired);
@@ -1833,7 +1830,7 @@ class open_addressing_ref_impl {
18331830 * @param sentinel The slot sentinel value
18341831 */
18351832 template <typename T>
1836- __device__ void wait_for_payload (T& slot, T const & sentinel) const noexcept
1833+ __device__ void wait_for_payload (T& slot, T sentinel) const noexcept
18371834 {
18381835 auto ref = cuda::atomic_ref<T, Scope>{slot};
18391836 T current;
0 commit comments