From bf3a0da3fe7d913ad4b8dd8d4d8d5351b506b15f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 00:18:27 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v4.6.0) - [github.com/pre-commit/mirrors-clang-format: v17.0.6 → v18.1.8](https://github.com/pre-commit/mirrors-clang-format/compare/v17.0.6...v18.1.8) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fff9035a2b..df070cbc51 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,13 +11,13 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: end-of-file-fixer - id: mixed-line-ending - id: trailing-whitespace - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v17.0.6 + rev: v18.1.8 hooks: - id: clang-format types_or: [file] From a3d8f6d982dcaf882e045beea2ad98abc2541beb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 00:19:05 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto code formatting --- cub/cub/agent/agent_merge_sort.cuh | 29 ++-- cub/cub/block/block_radix_sort.cuh | 132 +++++++++--------- cub/cub/block/radix_rank_sort_operations.cuh | 12 +- cub/cub/detail/nvtx3.hpp | 22 +-- .../device/dispatch/dispatch_batch_memcpy.cuh | 36 ++--- cub/cub/device/dispatch/dispatch_for.cuh | 8 +- cub/cub/device/dispatch/dispatch_scan.cuh | 8 +- .../device/dispatch/dispatch_spmv_orig.cuh | 3 +- cub/cub/thread/thread_operators.cuh | 16 +-- cub/cub/util_macro.cuh | 2 +- .../warp/specializations/warp_reduce_shfl.cuh | 24 ++-- .../catch2_test_device_radix_sort_custom.cu | 4 +- .../experimental/__launch/configuration.cuh | 4 +- .../test/hierarchy/hierarchy_custom_types.cu | 2 +- .../include/cuda/__memory_resource/resource.h | 3 +- .../cuda/std/__algorithm/comp_ref_type.h | 4 +- .../include/cuda/std/__algorithm/copy.h | 6 +- .../include/cuda/std/__algorithm/count.h | 6 +- .../include/cuda/std/__algorithm/count_if.h | 6 +- .../cuda/std/__algorithm/make_projected.h | 16 ++- .../include/cuda/std/__algorithm/mismatch.h | 32 ++--- .../include/cuda/std/__algorithm/move.h | 6 +- .../cuda/std/__algorithm/move_backward.h | 6 +- .../include/cuda/std/__algorithm/search.h | 36 ++--- .../include/cuda/std/__algorithm/search_n.h | 16 +-- .../include/cuda/std/__atomic/types/base.h | 36 ++--- .../include/cuda/std/__atomic/types/locked.h | 28 ++-- .../include/cuda/std/__atomic/types/small.h | 36 ++--- .../cuda/std/__concepts/__concept_macros.h | 6 +- .../include/cuda/std/__concepts/assignable.h | 4 +- .../cuda/std/__concepts/boolean_testable.h | 4 +- .../cuda/std/__concepts/equality_comparable.h | 16 +-- .../include/cuda/std/__concepts/swappable.h | 5 +- .../cuda/std/__concepts/totally_ordered.h | 32 ++--- .../include/cuda/std/__expected/expected.h | 50 +++---- .../include/cuda/std/__functional/bind.h | 16 +-- .../include/cuda/std/__functional/invoke.h | 4 +- .../cuda/std/__functional/mem_fun_ref.h | 12 +- .../__functional/pointer_to_binary_function.h | 4 +- .../__functional/pointer_to_unary_function.h | 4 +- .../cuda/std/__functional/unary_negate.h | 4 +- libcudacxx/include/cuda/std/__fwd/get.h | 4 +- .../include/cuda/std/__iterator/access.h | 8 +- .../cuda/std/__iterator/bounded_iter.h | 8 +- .../include/cuda/std/__iterator/concepts.h | 64 +++------ libcudacxx/include/cuda/std/__iterator/data.h | 4 +- .../include/cuda/std/__iterator/empty.h | 4 +- .../std/__iterator/incrementable_traits.h | 4 +- .../include/cuda/std/__iterator/iter_move.h | 9 +- .../include/cuda/std/__iterator/iter_swap.h | 11 +- .../cuda/std/__iterator/iterator_traits.h | 64 +++------ .../cuda/std/__iterator/move_iterator.h | 13 +- libcudacxx/include/cuda/std/__iterator/next.h | 6 +- libcudacxx/include/cuda/std/__iterator/prev.h | 6 +- .../cuda/std/__iterator/reverse_access.h | 8 +- .../cuda/std/__iterator/reverse_iterator.h | 44 +++--- libcudacxx/include/cuda/std/__iterator/size.h | 4 +- .../include/cuda/std/__mdspan/extents.h | 40 +++--- .../include/cuda/std/__mdspan/layout_stride.h | 30 ++-- libcudacxx/include/cuda/std/__mdspan/macros.h | 10 +- libcudacxx/include/cuda/std/__mdspan/mdspan.h | 26 ++-- .../__mdspan/standard_layout_static_array.h | 54 +++---- .../include/cuda/std/__mdspan/static_array.h | 14 +- .../include/cuda/std/__mdspan/submdspan.h | 7 +- .../cuda/std/__memory/allocate_at_least.h | 8 +- .../cuda/std/__memory/allocation_guard.h | 4 +- .../cuda/std/__memory/allocator_traits.h | 4 +- .../cuda/std/__memory/builtin_new_allocator.h | 4 +- .../cuda/std/__memory/compressed_pair.h | 2 +- .../include/cuda/std/__memory/construct_at.h | 24 ++-- .../cuda/std/__memory/pointer_traits.h | 4 +- .../std/__memory/uninitialized_algorithms.h | 4 +- .../include/cuda/std/__memory/unique_ptr.h | 57 ++++---- .../include/cuda/std/__numeric/midpoint.h | 12 +- libcudacxx/include/cuda/std/__ranges/access.h | 16 +-- .../include/cuda/std/__ranges/concepts.h | 4 +- libcudacxx/include/cuda/std/__ranges/data.h | 8 +- libcudacxx/include/cuda/std/__ranges/empty.h | 4 +- libcudacxx/include/cuda/std/__ranges/rbegin.h | 16 +-- libcudacxx/include/cuda/std/__ranges/rend.h | 16 +-- libcudacxx/include/cuda/std/__ranges/size.h | 16 +-- .../include/cuda/std/__ranges/subrange.h | 24 ++-- .../include/cuda/std/__tuple_dir/tuple_size.h | 14 +- .../cuda/std/__type_traits/common_reference.h | 12 +- .../cuda/std/__type_traits/is_assignable.h | 4 +- .../cuda/std/__type_traits/is_literal_type.h | 4 +- .../cuda/std/__type_traits/is_swappable.h | 8 +- .../cuda/std/__type_traits/result_of.h | 4 +- .../cuda/std/__utility/exception_guard.h | 4 +- .../include/cuda/std/__utility/forward_like.h | 4 +- libcudacxx/include/cuda/std/__utility/pair.h | 20 +-- libcudacxx/include/cuda/std/__utility/swap.h | 4 +- libcudacxx/include/cuda/std/atomic | 42 +++--- .../std/detail/libcxx/include/__bit_reference | 2 +- .../detail/libcxx/include/__threading_support | 9 +- .../std/detail/libcxx/include/__verbose_abort | 2 +- .../cuda/std/detail/libcxx/include/bitset | 10 +- .../cuda/std/detail/libcxx/include/chrono | 20 +-- .../cuda/std/detail/libcxx/include/cmath | 12 +- .../cuda/std/detail/libcxx/include/math.h | 100 ++++++------- .../cuda/std/detail/libcxx/include/optional | 2 +- .../cuda/std/detail/libcxx/include/span | 4 +- .../cuda/std/detail/libcxx/include/tuple | 36 +++-- .../cuda/std/detail/libcxx/include/variant | 29 ++-- libcudacxx/include/nv/detail/__target_macros | 10 +- .../async_resource_ref.construction.pass.cpp | 2 +- .../async_resource_ref.conversion.pass.cpp | 2 +- .../async_resource_ref.equality.pass.cpp | 2 +- .../async_resource_ref.inheritance.pass.cpp | 2 +- .../async_resource_ref.properties.pass.cpp | 2 +- .../resource_ref.construction.pass.cpp | 2 +- .../resource_ref.conversion.pass.cpp | 2 +- .../resource_ref.equality.pass.cpp | 2 +- .../resource_ref.inheritance.pass.cpp | 2 +- .../resource_ref.properties.pass.cpp | 2 +- .../cuda/proclaim_return_type.pass.cpp | 8 +- .../stream_ref.constructor.pass.cpp | 28 ++-- .../equality_comparable.compile.pass.cpp | 2 +- .../equality_comparable_with.compile.pass.cpp | 16 ++- .../totally_ordered.pass.cpp | 2 +- .../totally_ordered_with.pass.cpp | 14 +- .../concepts.object/copyable.compile.pass.cpp | 2 +- .../concepts.object/movable.compile.pass.cpp | 2 +- .../concepts.object/regular.compile.pass.cpp | 4 +- .../semiregular.compile.pass.cpp | 2 +- .../std/containers/views/mdspan/my_int.hpp | 4 +- .../constraints.compile.pass.cpp | 4 +- .../constraints.compile.pass.cpp | 4 +- .../incrementable_traits.compile.pass.cpp | 2 +- .../indirectly_readable.compile.pass.cpp | 2 +- .../weakly_incrementable.compile.pass.cpp | 2 +- .../func.bind_front/bind_front.pass.cpp | 4 +- .../func.invoke/invoke.pass.cpp | 4 +- .../unique.ptr.ctor/default.pass.cpp | 15 +- .../meta.trans.other/common_type.pass.cpp | 3 +- .../optional.monadic/or_else.pass.cpp | 4 +- .../utility/utility.swap/swap.pass.cpp | 4 +- .../utility/utility.swap/swap_array.pass.cpp | 4 +- .../variant.swap/swap.pass.cpp | 4 +- .../test/support/charconv_test_helpers.h | 4 +- libcudacxx/test/support/counting_predicates.h | 8 +- .../test/support/filesystem_test_helper.h | 5 +- libcudacxx/test/support/is_transparent.h | 20 +-- libcudacxx/test/support/test_convertible.h | 4 +- thrust/testing/unittest/testframework.h | 2 +- thrust/thrust/allocate_unique.h | 24 ++-- thrust/thrust/detail/advance.inl | 6 +- .../detail/allocator/copy_construct_range.inl | 22 +-- .../allocator/default_construct_range.inl | 4 +- .../operators/arithmetic_operators.h | 44 +++--- .../functional/operators/bitwise_operators.h | 4 +- .../functional/operators/logical_operators.h | 16 +-- .../operators/relational_operators.h | 40 +++--- thrust/thrust/detail/pointer.h | 4 +- thrust/thrust/detail/range/head_flags.h | 16 +-- thrust/thrust/detail/range/tail_flags.h | 4 +- thrust/thrust/detail/reference.h | 22 +-- thrust/thrust/detail/temporary_buffer.h | 10 +- thrust/thrust/functional.h | 18 +-- thrust/thrust/iterator/detail/retag.h | 12 +- thrust/thrust/iterator/iterator_facade.h | 30 ++-- thrust/thrust/memory.h | 6 +- thrust/thrust/optional.h | 26 ++-- thrust/thrust/pair.h | 10 +- .../thrust/system/cuda/detail/cross_system.h | 25 ++-- thrust/thrust/system/cuda/detail/future.inl | 8 +- thrust/thrust/system/cuda/detail/par.h | 8 +- .../thrust/system/cuda/detail/reduce_by_key.h | 16 +-- .../system/detail/generic/select_system.h | 22 +-- .../system/detail/generic/select_system.inl | 22 +-- .../system/detail/generic/temporary_buffer.h | 6 +- .../detail/generic/temporary_buffer.inl | 6 +- .../system/detail/sequential/general_copy.h | 4 +- thrust/thrust/tuple.h | 6 +- .../type_traits/is_contiguous_iterator.h | 4 +- 175 files changed, 1097 insertions(+), 1276 deletions(-) diff --git a/cub/cub/agent/agent_merge_sort.cuh b/cub/cub/agent/agent_merge_sort.cuh index 8dbe925d12..d7c0df7a30 100644 --- a/cub/cub/agent/agent_merge_sort.cuh +++ b/cub/cub/agent/agent_merge_sort.cuh @@ -346,20 +346,21 @@ struct AgentPartition OffsetT partition_at = (cub::min)(keys2_end - keys1_beg, items_per_tile * local_tile_idx); OffsetT partition_diag = - ping ? MergePath( - keys_ping + keys1_beg, - keys_ping + keys2_beg, - keys1_end - keys1_beg, - keys2_end - keys2_beg, - partition_at, - compare_op) - : MergePath( - keys_pong + keys1_beg, - keys_pong + keys2_beg, - keys1_end - keys1_beg, - keys2_end - keys2_beg, - partition_at, - compare_op); + ping + ? MergePath( + keys_ping + keys1_beg, + keys_ping + keys2_beg, + keys1_end - keys1_beg, + keys2_end - keys2_beg, + partition_at, + compare_op) + : MergePath( + keys_pong + keys1_beg, + keys_pong + keys2_beg, + keys1_end - keys1_beg, + keys2_end - keys2_beg, + partition_at, + compare_op); merge_partitions[partition_idx] = keys1_beg + partition_diag; } diff --git a/cub/cub/block/block_radix_sort.cuh b/cub/cub/block/block_radix_sort.cuh index d2eaadf7b2..cfaed8da05 100644 --- a/cub/cub/block/block_radix_sort.cuh +++ b/cub/cub/block/block_radix_sort.cuh @@ -674,9 +674,9 @@ public: //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) template _CCCL_DEVICE _CCCL_FORCEINLINE // - typename ::cuda::std::enable_if< // - !::cuda::std::is_convertible::value>::type - Sort(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer, int begin_bit, int end_bit) + typename ::cuda::std::enable_if< // + !::cuda::std::is_convertible::value>::type + Sort(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer, int begin_bit, int end_bit) { NullType values[ITEMS_PER_THREAD]; @@ -733,9 +733,9 @@ public: //! modify members of the key. template _CCCL_DEVICE _CCCL_FORCEINLINE // - typename ::cuda::std::enable_if< // - !::cuda::std::is_convertible::value>::type - Sort(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer) + typename ::cuda::std::enable_if< // + !::cuda::std::is_convertible::value>::type + Sort(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer) { Sort(keys, decomposer, 0, detail::radix::traits_t::default_end_bit(decomposer)); } @@ -874,13 +874,13 @@ public: //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) template _CCCL_DEVICE _CCCL_FORCEINLINE // - typename ::cuda::std::enable_if< // - !::cuda::std::is_convertible::value>::type - Sort(KeyT (&keys)[ITEMS_PER_THREAD], - ValueT (&values)[ITEMS_PER_THREAD], - DecomposerT decomposer, - int begin_bit, - int end_bit) + typename ::cuda::std::enable_if< // + !::cuda::std::is_convertible::value>::type + Sort(KeyT (&keys)[ITEMS_PER_THREAD], + ValueT (&values)[ITEMS_PER_THREAD], + DecomposerT decomposer, + int begin_bit, + int end_bit) { SortBlocked(keys, values, begin_bit, end_bit, Int2Type(), Int2Type(), decomposer); } @@ -943,9 +943,9 @@ public: //! modify members of the key. template _CCCL_DEVICE _CCCL_FORCEINLINE // - typename ::cuda::std::enable_if< // - !::cuda::std::is_convertible::value>::type - Sort(KeyT (&keys)[ITEMS_PER_THREAD], ValueT (&values)[ITEMS_PER_THREAD], DecomposerT decomposer) + typename ::cuda::std::enable_if< // + !::cuda::std::is_convertible::value>::type + Sort(KeyT (&keys)[ITEMS_PER_THREAD], ValueT (&values)[ITEMS_PER_THREAD], DecomposerT decomposer) { Sort(keys, values, decomposer, 0, detail::radix::traits_t::default_end_bit(decomposer)); } @@ -1064,9 +1064,9 @@ public: //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) template _CCCL_DEVICE _CCCL_FORCEINLINE // - typename ::cuda::std::enable_if< // - !::cuda::std::is_convertible::value>::type - SortDescending(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer, int begin_bit, int end_bit) + typename ::cuda::std::enable_if< // + !::cuda::std::is_convertible::value>::type + SortDescending(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer, int begin_bit, int end_bit) { NullType values[ITEMS_PER_THREAD]; @@ -1123,9 +1123,9 @@ public: //! modify members of the key. template _CCCL_DEVICE _CCCL_FORCEINLINE // - typename ::cuda::std::enable_if< // - !::cuda::std::is_convertible::value>::type - SortDescending(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer) + typename ::cuda::std::enable_if< // + !::cuda::std::is_convertible::value>::type + SortDescending(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer) { NullType values[ITEMS_PER_THREAD]; @@ -1271,13 +1271,13 @@ public: //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) template _CCCL_DEVICE _CCCL_FORCEINLINE // - typename ::cuda::std::enable_if< // - !::cuda::std::is_convertible::value>::type - SortDescending(KeyT (&keys)[ITEMS_PER_THREAD], - ValueT (&values)[ITEMS_PER_THREAD], - DecomposerT decomposer, - int begin_bit, - int end_bit) + typename ::cuda::std::enable_if< // + !::cuda::std::is_convertible::value>::type + SortDescending(KeyT (&keys)[ITEMS_PER_THREAD], + ValueT (&values)[ITEMS_PER_THREAD], + DecomposerT decomposer, + int begin_bit, + int end_bit) { SortBlocked(keys, values, begin_bit, end_bit, Int2Type(), Int2Type(), decomposer); } @@ -1340,9 +1340,9 @@ public: //! modify members of the key. template _CCCL_DEVICE _CCCL_FORCEINLINE // - typename ::cuda::std::enable_if< // - !::cuda::std::is_convertible::value>::type - SortDescending(KeyT (&keys)[ITEMS_PER_THREAD], ValueT (&values)[ITEMS_PER_THREAD], DecomposerT decomposer) + typename ::cuda::std::enable_if< // + !::cuda::std::is_convertible::value>::type + SortDescending(KeyT (&keys)[ITEMS_PER_THREAD], ValueT (&values)[ITEMS_PER_THREAD], DecomposerT decomposer) { SortBlocked( keys, @@ -1473,9 +1473,9 @@ public: //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) template _CCCL_DEVICE _CCCL_FORCEINLINE // - typename ::cuda::std::enable_if< // - !::cuda::std::is_convertible::value>::type - SortBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer, int begin_bit, int end_bit) + typename ::cuda::std::enable_if< // + !::cuda::std::is_convertible::value>::type + SortBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer, int begin_bit, int end_bit) { NullType values[ITEMS_PER_THREAD]; @@ -1533,9 +1533,9 @@ public: //! modify members of the key. template _CCCL_DEVICE _CCCL_FORCEINLINE // - typename ::cuda::std::enable_if< // - !::cuda::std::is_convertible::value>::type - SortBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer) + typename ::cuda::std::enable_if< // + !::cuda::std::is_convertible::value>::type + SortBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer) { NullType values[ITEMS_PER_THREAD]; @@ -1677,13 +1677,13 @@ public: //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) template _CCCL_DEVICE _CCCL_FORCEINLINE // - typename ::cuda::std::enable_if< // - !::cuda::std::is_convertible::value>::type - SortBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], - ValueT (&values)[ITEMS_PER_THREAD], - DecomposerT decomposer, - int begin_bit, - int end_bit) + typename ::cuda::std::enable_if< // + !::cuda::std::is_convertible::value>::type + SortBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], + ValueT (&values)[ITEMS_PER_THREAD], + DecomposerT decomposer, + int begin_bit, + int end_bit) { SortBlockedToStriped(keys, values, begin_bit, end_bit, Int2Type(), Int2Type(), decomposer); } @@ -1742,9 +1742,9 @@ public: //! modify members of the key. template _CCCL_DEVICE _CCCL_FORCEINLINE // - typename ::cuda::std::enable_if< // - !::cuda::std::is_convertible::value>::type - SortBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], ValueT (&values)[ITEMS_PER_THREAD], DecomposerT decomposer) + typename ::cuda::std::enable_if< // + !::cuda::std::is_convertible::value>::type + SortBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], ValueT (&values)[ITEMS_PER_THREAD], DecomposerT decomposer) { SortBlockedToStriped( keys, @@ -1871,9 +1871,9 @@ public: //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) template _CCCL_DEVICE _CCCL_FORCEINLINE // - typename ::cuda::std::enable_if< // - !::cuda::std::is_convertible::value>::type - SortDescendingBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer, int begin_bit, int end_bit) + typename ::cuda::std::enable_if< // + !::cuda::std::is_convertible::value>::type + SortDescendingBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer, int begin_bit, int end_bit) { NullType values[ITEMS_PER_THREAD]; @@ -1931,9 +1931,9 @@ public: //! modify members of the key. template _CCCL_DEVICE _CCCL_FORCEINLINE // - typename ::cuda::std::enable_if< // - !::cuda::std::is_convertible::value>::type - SortDescendingBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer) + typename ::cuda::std::enable_if< // + !::cuda::std::is_convertible::value>::type + SortDescendingBlockedToStriped(KeyT (&keys)[ITEMS_PER_THREAD], DecomposerT decomposer) { NullType values[ITEMS_PER_THREAD]; @@ -2075,14 +2075,14 @@ public: //! comparison (e.g., `(sizeof(float) + sizeof(long long int)) * 8`) template _CCCL_DEVICE _CCCL_FORCEINLINE // - typename ::cuda::std::enable_if< // - !::cuda::std::is_convertible::value>::type - SortDescendingBlockedToStriped( - KeyT (&keys)[ITEMS_PER_THREAD], - ValueT (&values)[ITEMS_PER_THREAD], - DecomposerT decomposer, - int begin_bit, - int end_bit) + typename ::cuda::std::enable_if< // + !::cuda::std::is_convertible::value>::type + SortDescendingBlockedToStriped( + KeyT (&keys)[ITEMS_PER_THREAD], + ValueT (&values)[ITEMS_PER_THREAD], + DecomposerT decomposer, + int begin_bit, + int end_bit) { SortBlockedToStriped(keys, values, begin_bit, end_bit, Int2Type(), Int2Type(), decomposer); } @@ -2141,10 +2141,10 @@ public: //! modify members of the key. template _CCCL_DEVICE _CCCL_FORCEINLINE // - typename ::cuda::std::enable_if< // - !::cuda::std::is_convertible::value>::type - SortDescendingBlockedToStriped( - KeyT (&keys)[ITEMS_PER_THREAD], ValueT (&values)[ITEMS_PER_THREAD], DecomposerT decomposer) + typename ::cuda::std::enable_if< // + !::cuda::std::is_convertible::value>::type + SortDescendingBlockedToStriped( + KeyT (&keys)[ITEMS_PER_THREAD], ValueT (&values)[ITEMS_PER_THREAD], DecomposerT decomposer) { SortBlockedToStriped( keys, diff --git a/cub/cub/block/radix_rank_sort_operations.cuh b/cub/cub/block/radix_rank_sort_operations.cuh index cd52ca0b9d..5800b136c0 100644 --- a/cub/cub/block/radix_rank_sort_operations.cuh +++ b/cub/cub/block/radix_rank_sort_operations.cuh @@ -583,8 +583,8 @@ private: public: template static _CCCL_HOST_DEVICE _CCCL_FORCEINLINE // - bit_ordered_type - In(bit_ordered_type key, DecomposerT decomposer = {}) + bit_ordered_type + In(bit_ordered_type key, DecomposerT decomposer = {}) { key = bit_ordered_conversion_policy::to_bit_ordered(decomposer, key); _CCCL_IF_CONSTEXPR (IS_DESCENDING) @@ -596,8 +596,8 @@ public: template static _CCCL_HOST_DEVICE _CCCL_FORCEINLINE // - bit_ordered_type - Out(bit_ordered_type key, DecomposerT decomposer = {}) + bit_ordered_type + Out(bit_ordered_type key, DecomposerT decomposer = {}) { _CCCL_IF_CONSTEXPR (IS_DESCENDING) { @@ -609,8 +609,8 @@ public: template static _CCCL_HOST_DEVICE _CCCL_FORCEINLINE // - bit_ordered_type - DefaultKey(DecomposerT decomposer = {}) + bit_ordered_type + DefaultKey(DecomposerT decomposer = {}) { return IS_DESCENDING ? traits::min_raw_binary_key(decomposer) : traits::max_raw_binary_key(decomposer); } diff --git a/cub/cub/detail/nvtx3.hpp b/cub/cub/detail/nvtx3.hpp index dcbafd20ef..c4191298e9 100644 --- a/cub/cub/detail/nvtx3.hpp +++ b/cub/cub/detail/nvtx3.hpp @@ -1958,17 +1958,17 @@ NVTX3_INLINE_IF_REQUESTED namespace NVTX3_VERSION_NAMESPACE */ constexpr event_attributes() noexcept : attributes_{ - NVTX_VERSION, // version - sizeof(nvtxEventAttributes_t), // size - 0, // category - NVTX_COLOR_UNKNOWN, // color type - 0, // color value - NVTX_PAYLOAD_UNKNOWN, // payload type - 0, // reserved 4B - {0}, // payload value (union) // NOTE(bgruber): added braces - NVTX_MESSAGE_UNKNOWN, // message type - {0} // message value (union) // NOTE(bgruber): added braces - } + NVTX_VERSION, // version + sizeof(nvtxEventAttributes_t), // size + 0, // category + NVTX_COLOR_UNKNOWN, // color type + 0, // color value + NVTX_PAYLOAD_UNKNOWN, // payload type + 0, // reserved 4B + {0}, // payload value (union) // NOTE(bgruber): added braces + NVTX_MESSAGE_UNKNOWN, // message type + {0} // message value (union) // NOTE(bgruber): added braces + } {} /** diff --git a/cub/cub/device/dispatch/dispatch_batch_memcpy.cuh b/cub/cub/device/dispatch/dispatch_batch_memcpy.cuh index 2544a0c2dc..df84b2d6b9 100644 --- a/cub/cub/device/dispatch/dispatch_batch_memcpy.cuh +++ b/cub/cub/device/dispatch/dispatch_batch_memcpy.cuh @@ -302,15 +302,15 @@ struct DeviceBatchMemcpyPolicy { static constexpr bool PREFER_POW2_BITS = true; using AgentSmallBufferPolicyT = AgentBatchMemcpyPolicy< - BLOCK_THREADS, - BUFFERS_PER_THREAD, - TLEV_BYTES_PER_THREAD, - PREFER_POW2_BITS, - LARGE_BUFFER_BLOCK_THREADS * LARGE_BUFFER_BYTES_PER_THREAD, - WARP_LEVEL_THRESHOLD, - BLOCK_LEVEL_THRESHOLD, - buff_delay_constructor_t, - block_delay_constructor_t>; + BLOCK_THREADS, + BUFFERS_PER_THREAD, + TLEV_BYTES_PER_THREAD, + PREFER_POW2_BITS, + LARGE_BUFFER_BLOCK_THREADS * LARGE_BUFFER_BYTES_PER_THREAD, + WARP_LEVEL_THRESHOLD, + BLOCK_LEVEL_THRESHOLD, + buff_delay_constructor_t, + block_delay_constructor_t>; using AgentLargeBufferPolicyT = AgentBatchMemcpyLargeBuffersPolicy; @@ -321,15 +321,15 @@ struct DeviceBatchMemcpyPolicy { static constexpr bool PREFER_POW2_BITS = false; using AgentSmallBufferPolicyT = AgentBatchMemcpyPolicy< - BLOCK_THREADS, - BUFFERS_PER_THREAD, - TLEV_BYTES_PER_THREAD, - PREFER_POW2_BITS, - LARGE_BUFFER_BLOCK_THREADS * LARGE_BUFFER_BYTES_PER_THREAD, - WARP_LEVEL_THRESHOLD, - BLOCK_LEVEL_THRESHOLD, - buff_delay_constructor_t, - block_delay_constructor_t>; + BLOCK_THREADS, + BUFFERS_PER_THREAD, + TLEV_BYTES_PER_THREAD, + PREFER_POW2_BITS, + LARGE_BUFFER_BLOCK_THREADS * LARGE_BUFFER_BYTES_PER_THREAD, + WARP_LEVEL_THRESHOLD, + BLOCK_LEVEL_THRESHOLD, + buff_delay_constructor_t, + block_delay_constructor_t>; using AgentLargeBufferPolicyT = AgentBatchMemcpyLargeBuffersPolicy; diff --git a/cub/cub/device/dispatch/dispatch_for.cuh b/cub/cub/device/dispatch/dispatch_for.cuh index 2d641ed5f3..7a657d6703 100644 --- a/cub/cub/device/dispatch/dispatch_for.cuh +++ b/cub/cub/device/dispatch/dispatch_for.cuh @@ -171,8 +171,8 @@ struct dispatch_t : PolicyHubT {} template - CUB_RUNTIME_FUNCTION _CCCL_FORCEINLINE - cudaError_t Invoke(::cuda::std::false_type /* block size is not known at compile time */) + CUB_RUNTIME_FUNCTION + _CCCL_FORCEINLINE cudaError_t Invoke(::cuda::std::false_type /* block size is not known at compile time */) { using max_policy_t = typename dispatch_t::MaxPolicy; @@ -228,8 +228,8 @@ struct dispatch_t : PolicyHubT } template - CUB_RUNTIME_FUNCTION _CCCL_FORCEINLINE - cudaError_t Invoke(::cuda::std::true_type /* block size is known at compile time */) + CUB_RUNTIME_FUNCTION + _CCCL_FORCEINLINE cudaError_t Invoke(::cuda::std::true_type /* block size is known at compile time */) { using max_policy_t = typename dispatch_t::MaxPolicy; diff --git a/cub/cub/device/dispatch/dispatch_scan.cuh b/cub/cub/device/dispatch/dispatch_scan.cuh index 346bda4c28..d7901fc9c7 100644 --- a/cub/cub/device/dispatch/dispatch_scan.cuh +++ b/cub/cub/device/dispatch/dispatch_scan.cuh @@ -230,10 +230,10 @@ template ::value, - cub::detail::value_t, - typename InitValueT::value_type>, - cub::detail::value_t>, + ::cuda::std::_If::value, + cub::detail::value_t, + typename InitValueT::value_type>, + cub::detail::value_t>, typename SelectedPolicy = DeviceScanPolicy> struct DispatchScan : SelectedPolicy { diff --git a/cub/cub/device/dispatch/dispatch_spmv_orig.cuh b/cub/cub/device/dispatch/dispatch_spmv_orig.cuh index b27a1d6e6d..95e51ebdba 100644 --- a/cub/cub/device/dispatch/dispatch_spmv_orig.cuh +++ b/cub/cub/device/dispatch/dispatch_spmv_orig.cuh @@ -898,7 +898,8 @@ struct DispatchSpmv typename SpmvKernelT, typename SegmentFixupKernelT, typename SpmvEmptyMatrixKernelT> - CUB_DETAIL_RUNTIME_DEBUG_SYNC_IS_NOT_SUPPORTED CUB_RUNTIME_FUNCTION _CCCL_VISIBILITY_HIDDEN _CCCL_FORCEINLINE static cudaError_t + CUB_DETAIL_RUNTIME_DEBUG_SYNC_IS_NOT_SUPPORTED CUB_RUNTIME_FUNCTION _CCCL_VISIBILITY_HIDDEN + _CCCL_FORCEINLINE static cudaError_t Dispatch(void* d_temp_storage, size_t& temp_storage_bytes, SpmvParamsT& spmv_params, diff --git a/cub/cub/thread/thread_operators.cuh b/cub/cub/thread/thread_operators.cuh index 2d69bb40e9..21ed8592d6 100644 --- a/cub/cub/thread/thread_operators.cuh +++ b/cub/cub/thread/thread_operators.cuh @@ -112,8 +112,8 @@ struct Sum { /// Binary sum operator, returns `t + u` template - _CCCL_HOST_DEVICE _CCCL_FORCEINLINE auto operator()(T&& t, U&& u) const - -> decltype(::cuda::std::forward(t) + ::cuda::std::forward(u)) + _CCCL_HOST_DEVICE _CCCL_FORCEINLINE auto + operator()(T&& t, U&& u) const -> decltype(::cuda::std::forward(t) + ::cuda::std::forward(u)) { return ::cuda::std::forward(t) + ::cuda::std::forward(u); } @@ -124,8 +124,8 @@ struct Difference { /// Binary difference operator, returns `t - u` template - _CCCL_HOST_DEVICE _CCCL_FORCEINLINE auto operator()(T&& t, U&& u) const - -> decltype(::cuda::std::forward(t) - ::cuda::std::forward(u)) + _CCCL_HOST_DEVICE _CCCL_FORCEINLINE auto + operator()(T&& t, U&& u) const -> decltype(::cuda::std::forward(t) - ::cuda::std::forward(u)) { return ::cuda::std::forward(t) - ::cuda::std::forward(u); } @@ -136,8 +136,8 @@ struct Division { /// Binary division operator, returns `t / u` template - _CCCL_HOST_DEVICE _CCCL_FORCEINLINE auto operator()(T&& t, U&& u) const - -> decltype(::cuda::std::forward(t) / ::cuda::std::forward(u)) + _CCCL_HOST_DEVICE _CCCL_FORCEINLINE auto + operator()(T&& t, U&& u) const -> decltype(::cuda::std::forward(t) / ::cuda::std::forward(u)) { return ::cuda::std::forward(t) / ::cuda::std::forward(u); } @@ -400,8 +400,8 @@ struct BinaryFlip {} template - _CCCL_DEVICE auto operator()(T&& t, U&& u) - -> decltype(binary_op(::cuda::std::forward(u), ::cuda::std::forward(t))) + _CCCL_DEVICE auto + operator()(T&& t, U&& u) -> decltype(binary_op(::cuda::std::forward(u), ::cuda::std::forward(t))) { return binary_op(::cuda::std::forward(u), ::cuda::std::forward(t)); } diff --git a/cub/cub/util_macro.cuh b/cub/cub/util_macro.cuh index 7a7a80568f..162641d348 100644 --- a/cub/cub/util_macro.cuh +++ b/cub/cub/util_macro.cuh @@ -85,7 +85,7 @@ constexpr _CCCL_HOST_DEVICE auto max CUB_PREVENT_MACRO_SUBSTITUTION(T&& t, U&& u #ifndef CUB_QUOTIENT_CEILING /// Quotient of x/y rounded up to nearest integer // FIXME(bgruber): the following computation can overflow, use cuda::ceil_div instead -# define CUB_QUOTIENT_CEILING(x, y) (((x) + (y) -1) / (y)) +# define CUB_QUOTIENT_CEILING(x, y) (((x) + (y) - 1) / (y)) #endif #ifndef CUB_ROUND_UP_NEAREST diff --git a/cub/cub/warp/specializations/warp_reduce_shfl.cuh b/cub/cub/warp/specializations/warp_reduce_shfl.cuh index e5bd4f9d0c..41b23e6dff 100644 --- a/cub/cub/warp/specializations/warp_reduce_shfl.cuh +++ b/cub/cub/warp/specializations/warp_reduce_shfl.cuh @@ -605,10 +605,10 @@ struct WarpReduceShfl template _CCCL_DEVICE _CCCL_FORCEINLINE - typename ::cuda::std::enable_if<(::cuda::std::is_same::value || ::cuda::std::is_same::value) - && detail::reduce_add_exists<>::value, - T>::type - ReduceImpl(Int2Type<1> /* all_lanes_valid */, T input, int /* valid_items */, cub::Sum /* reduction_op */) + typename ::cuda::std::enable_if<(::cuda::std::is_same::value || ::cuda::std::is_same::value) + && detail::reduce_add_exists<>::value, + T>::type + ReduceImpl(Int2Type<1> /* all_lanes_valid */, T input, int /* valid_items */, cub::Sum /* reduction_op */) { T output = input; @@ -621,10 +621,10 @@ struct WarpReduceShfl template _CCCL_DEVICE _CCCL_FORCEINLINE - typename ::cuda::std::enable_if<(::cuda::std::is_same::value || ::cuda::std::is_same::value) - && detail::reduce_min_exists<>::value, - T>::type - ReduceImpl(Int2Type<1> /* all_lanes_valid */, T input, int /* valid_items */, cub::Min /* reduction_op */) + typename ::cuda::std::enable_if<(::cuda::std::is_same::value || ::cuda::std::is_same::value) + && detail::reduce_min_exists<>::value, + T>::type + ReduceImpl(Int2Type<1> /* all_lanes_valid */, T input, int /* valid_items */, cub::Min /* reduction_op */) { T output = input; @@ -637,10 +637,10 @@ struct WarpReduceShfl template _CCCL_DEVICE _CCCL_FORCEINLINE - typename ::cuda::std::enable_if<(::cuda::std::is_same::value || ::cuda::std::is_same::value) - && detail::reduce_max_exists<>::value, - T>::type - ReduceImpl(Int2Type<1> /* all_lanes_valid */, T input, int /* valid_items */, cub::Max /* reduction_op */) + typename ::cuda::std::enable_if<(::cuda::std::is_same::value || ::cuda::std::is_same::value) + && detail::reduce_max_exists<>::value, + T>::type + ReduceImpl(Int2Type<1> /* all_lanes_valid */, T input, int /* valid_items */, cub::Max /* reduction_op */) { T output = input; diff --git a/cub/test/catch2_test_device_radix_sort_custom.cu b/cub/test/catch2_test_device_radix_sort_custom.cu index 9f4a190c78..b73e3137c5 100644 --- a/cub/test/catch2_test_device_radix_sort_custom.cu +++ b/cub/test/catch2_test_device_radix_sort_custom.cu @@ -54,8 +54,8 @@ DECLARE_LAUNCH_WRAPPER(cub::DeviceRadixSort::SortPairsDescending, sort_pairs_des // %PARAM% TEST_LAUNCH lid 0:1 using key = c2h::custom_type_t; + c2h::lexicographical_less_comparable_t, + c2h::lexicographical_greater_comparable_t>; using value = std::size_t; struct key_decomposer_t diff --git a/cudax/include/cuda/experimental/__launch/configuration.cuh b/cudax/include/cuda/experimental/__launch/configuration.cuh index bc619afd79..99ff65f7c3 100644 --- a/cudax/include/cuda/experimental/__launch/configuration.cuh +++ b/cudax/include/cuda/experimental/__launch/configuration.cuh @@ -331,10 +331,10 @@ struct kernel_config constexpr kernel_config(const Dimensions& dims, const Options&... opts) : dims(dims) - , options(opts...){}; + , options(opts...) {}; constexpr kernel_config(const Dimensions& dims, const ::cuda::std::tuple& opts) : dims(dims) - , options(opts){}; + , options(opts) {}; /** * @brief Add a new option to this configuration diff --git a/cudax/test/hierarchy/hierarchy_custom_types.cu b/cudax/test/hierarchy/hierarchy_custom_types.cu index 54304833a3..5b06959eea 100644 --- a/cudax/test/hierarchy/hierarchy_custom_types.cu +++ b/cudax/test/hierarchy/hierarchy_custom_types.cu @@ -25,7 +25,7 @@ struct custom_level_dims : public cudax::level_dimensions { int dummy; constexpr custom_level_dims() - : cudax::level_dimensions(){}; + : cudax::level_dimensions() {}; }; struct custom_level_test diff --git a/libcudacxx/include/cuda/__memory_resource/resource.h b/libcudacxx/include/cuda/__memory_resource/resource.h index cf892bfe08..d97e1f797e 100644 --- a/libcudacxx/include/cuda/__memory_resource/resource.h +++ b/libcudacxx/include/cuda/__memory_resource/resource.h @@ -74,7 +74,8 @@ _LIBCUDACXX_CONCEPT async_resource_with = template _LIBCUDACXX_CONCEPT __different_resource = - (!_CUDA_VSTD::same_as<_CUDA_VSTD::decay_t<_Resource>, _CUDA_VSTD::decay_t<_OtherResource>>) &&resource<_OtherResource>; + (!_CUDA_VSTD::same_as<_CUDA_VSTD::decay_t<_Resource>, _CUDA_VSTD::decay_t<_OtherResource>>) + && resource<_OtherResource>; _LIBCUDACXX_END_NAMESPACE_CUDA_MR diff --git a/libcudacxx/include/cuda/std/__algorithm/comp_ref_type.h b/libcudacxx/include/cuda/std/__algorithm/comp_ref_type.h index 3b6fd7db6b..954ba70179 100644 --- a/libcudacxx/include/cuda/std/__algorithm/comp_ref_type.h +++ b/libcudacxx/include/cuda/std/__algorithm/comp_ref_type.h @@ -58,8 +58,8 @@ struct __debug_less } template - inline _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 decltype((void) declval<_Compare&>()( - declval<_LHS&>(), declval<_RHS&>())) + inline _LIBCUDACXX_INLINE_VISIBILITY + _CCCL_CONSTEXPR_CXX14 decltype((void) declval<_Compare&>()(declval<_LHS&>(), declval<_RHS&>())) __do_compare_assert(int, _LHS& __l, _RHS& __r) { _LIBCUDACXX_DEBUG_ASSERT(!__comp_(__l, __r), "Comparator does not induce a strict weak ordering"); diff --git a/libcudacxx/include/cuda/std/__algorithm/copy.h b/libcudacxx/include/cuda/std/__algorithm/copy.h index 01cb48f6a4..03e10fe98c 100644 --- a/libcudacxx/include/cuda/std/__algorithm/copy.h +++ b/libcudacxx/include/cuda/std/__algorithm/copy.h @@ -33,9 +33,9 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - pair<_InputIterator, _OutputIterator> - __copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) +inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX14 pair<_InputIterator, _OutputIterator> +__copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { for (; __first != __last; ++__first, (void) ++__result) { diff --git a/libcudacxx/include/cuda/std/__algorithm/count.h b/libcudacxx/include/cuda/std/__algorithm/count.h index d9fe88beeb..a144e891d5 100644 --- a/libcudacxx/include/cuda/std/__algorithm/count.h +++ b/libcudacxx/include/cuda/std/__algorithm/count.h @@ -25,9 +25,9 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -_CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - __iter_diff_t<_InputIterator> - count(_InputIterator __first, _InputIterator __last, const _Tp& __value_) +_CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX14 __iter_diff_t<_InputIterator> +count(_InputIterator __first, _InputIterator __last, const _Tp& __value_) { __iter_diff_t<_InputIterator> __r{0}; for (; __first != __last; ++__first) diff --git a/libcudacxx/include/cuda/std/__algorithm/count_if.h b/libcudacxx/include/cuda/std/__algorithm/count_if.h index 0821cdbe33..d34b208d72 100644 --- a/libcudacxx/include/cuda/std/__algorithm/count_if.h +++ b/libcudacxx/include/cuda/std/__algorithm/count_if.h @@ -25,9 +25,9 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -_CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - __iter_diff_t<_InputIterator> - count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) +_CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX14 __iter_diff_t<_InputIterator> +count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) { __iter_diff_t<_InputIterator> __r{0}; for (; __first != __last; ++__first) diff --git a/libcudacxx/include/cuda/std/__algorithm/make_projected.h b/libcudacxx/include/cuda/std/__algorithm/make_projected.h index 53c8946f1c..2bd5764c1a 100644 --- a/libcudacxx/include/cuda/std/__algorithm/make_projected.h +++ b/libcudacxx/include/cuda/std/__algorithm/make_projected.h @@ -45,19 +45,21 @@ struct _ProjectedPred {} template - typename __invoke_of<_Pred&, - decltype(_CUDA_VSTD::__invoke(_CUDA_VSTD::declval<_Proj&>(), _CUDA_VSTD::declval<_Tp>()))>:: - type constexpr _LIBCUDACXX_INLINE_VISIBILITY + typename __invoke_of< + _Pred&, + decltype(_CUDA_VSTD::__invoke(_CUDA_VSTD::declval<_Proj&>(), _CUDA_VSTD::declval<_Tp>()))>::type constexpr + _LIBCUDACXX_INLINE_VISIBILITY operator()(_Tp&& __v) const { return _CUDA_VSTD::__invoke(__pred, _CUDA_VSTD::__invoke(__proj, _CUDA_VSTD::forward<_Tp>(__v))); } template - typename __invoke_of<_Pred&, - decltype(_CUDA_VSTD::__invoke(_CUDA_VSTD::declval<_Proj&>(), _CUDA_VSTD::declval<_T1>())), - decltype(_CUDA_VSTD::__invoke(_CUDA_VSTD::declval<_Proj&>(), _CUDA_VSTD::declval<_T2>()))>:: - type constexpr _LIBCUDACXX_INLINE_VISIBILITY + typename __invoke_of< + _Pred&, + decltype(_CUDA_VSTD::__invoke(_CUDA_VSTD::declval<_Proj&>(), _CUDA_VSTD::declval<_T1>())), + decltype(_CUDA_VSTD::__invoke(_CUDA_VSTD::declval<_Proj&>(), _CUDA_VSTD::declval<_T2>()))>::type constexpr + _LIBCUDACXX_INLINE_VISIBILITY operator()(_T1&& __lhs, _T2&& __rhs) const { return _CUDA_VSTD::__invoke(__pred, diff --git a/libcudacxx/include/cuda/std/__algorithm/mismatch.h b/libcudacxx/include/cuda/std/__algorithm/mismatch.h index 0e0c938d7d..816e4352fa 100644 --- a/libcudacxx/include/cuda/std/__algorithm/mismatch.h +++ b/libcudacxx/include/cuda/std/__algorithm/mismatch.h @@ -27,9 +27,9 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -_CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - pair<_InputIterator1, _InputIterator2> - mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __pred) +_CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX14 pair<_InputIterator1, _InputIterator2> +mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __pred) { for (; __first1 != __last1; ++__first1, (void) ++__first2) { @@ -42,22 +42,22 @@ _CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _ } template -_CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - pair<_InputIterator1, _InputIterator2> - mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) +_CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX14 pair<_InputIterator1, _InputIterator2> +mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) { return _CUDA_VSTD::mismatch(__first1, __last1, __first2, __equal_to{}); } #if _CCCL_STD_VER > 2011 template -_CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - pair<_InputIterator1, _InputIterator2> - mismatch(_InputIterator1 __first1, - _InputIterator1 __last1, - _InputIterator2 __first2, - _InputIterator2 __last2, - _BinaryPredicate __pred) +_CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX14 pair<_InputIterator1, _InputIterator2> +mismatch(_InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _BinaryPredicate __pred) { for (; __first1 != __last1 && __first2 != __last2; ++__first1, (void) ++__first2) { @@ -70,9 +70,9 @@ _CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _ } template -_CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - pair<_InputIterator1, _InputIterator2> - mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) +_CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX14 pair<_InputIterator1, _InputIterator2> +mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) { return _CUDA_VSTD::mismatch(__first1, __last1, __first2, __last2, __equal_to{}); } diff --git a/libcudacxx/include/cuda/std/__algorithm/move.h b/libcudacxx/include/cuda/std/__algorithm/move.h index 99abd288bb..4a580416f8 100644 --- a/libcudacxx/include/cuda/std/__algorithm/move.h +++ b/libcudacxx/include/cuda/std/__algorithm/move.h @@ -32,9 +32,9 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - pair<_InputIterator, _OutputIterator> - __move(_InputIterator __first, _InputIterator __last, _OutputIterator __result) +inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX14 pair<_InputIterator, _OutputIterator> +__move(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { for (; __first != __last; ++__first, (void) ++__result) { diff --git a/libcudacxx/include/cuda/std/__algorithm/move_backward.h b/libcudacxx/include/cuda/std/__algorithm/move_backward.h index d3b5c8065b..3b6cd01ad7 100644 --- a/libcudacxx/include/cuda/std/__algorithm/move_backward.h +++ b/libcudacxx/include/cuda/std/__algorithm/move_backward.h @@ -31,9 +31,9 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - pair<_BidirectionalIterator, _OutputIterator> - __move_backward(_BidirectionalIterator __first, _BidirectionalIterator __last, _OutputIterator __result) +inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX14 pair<_BidirectionalIterator, _OutputIterator> +__move_backward(_BidirectionalIterator __first, _BidirectionalIterator __last, _OutputIterator __result) { while (__first != __last) { diff --git a/libcudacxx/include/cuda/std/__algorithm/search.h b/libcudacxx/include/cuda/std/__algorithm/search.h index 0aaccb4b1c..87de6bbc87 100644 --- a/libcudacxx/include/cuda/std/__algorithm/search.h +++ b/libcudacxx/include/cuda/std/__algorithm/search.h @@ -33,15 +33,15 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -_CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - pair<_ForwardIterator1, _ForwardIterator1> - __search(_ForwardIterator1 __first1, - _ForwardIterator1 __last1, - _ForwardIterator2 __first2, - _ForwardIterator2 __last2, - _BinaryPredicate __pred, - forward_iterator_tag, - forward_iterator_tag) +_CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX14 pair<_ForwardIterator1, _ForwardIterator1> +__search(_ForwardIterator1 __first1, + _ForwardIterator1 __last1, + _ForwardIterator2 __first2, + _ForwardIterator2 __last2, + _BinaryPredicate __pred, + forward_iterator_tag, + forward_iterator_tag) { if (__first2 == __last2) { @@ -85,15 +85,15 @@ _CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _ } template -_CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - pair<_RandomAccessIterator1, _RandomAccessIterator1> - __search(_RandomAccessIterator1 __first1, - _RandomAccessIterator1 __last1, - _RandomAccessIterator2 __first2, - _RandomAccessIterator2 __last2, - _BinaryPredicate __pred, - random_access_iterator_tag, - random_access_iterator_tag) +_CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX14 pair<_RandomAccessIterator1, _RandomAccessIterator1> +__search(_RandomAccessIterator1 __first1, + _RandomAccessIterator1 __last1, + _RandomAccessIterator2 __first2, + _RandomAccessIterator2 __last2, + _BinaryPredicate __pred, + random_access_iterator_tag, + random_access_iterator_tag) { typedef typename iterator_traits<_RandomAccessIterator1>::difference_type _Diff1; typedef typename iterator_traits<_RandomAccessIterator2>::difference_type _Diff2; diff --git a/libcudacxx/include/cuda/std/__algorithm/search_n.h b/libcudacxx/include/cuda/std/__algorithm/search_n.h index 257b9b089e..ffebc162c3 100644 --- a/libcudacxx/include/cuda/std/__algorithm/search_n.h +++ b/libcudacxx/include/cuda/std/__algorithm/search_n.h @@ -79,14 +79,14 @@ __search_n(_ForwardIterator __first, } template -_CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - _RandomAccessIterator - __search_n(_RandomAccessIterator __first, - _RandomAccessIterator __last, - _Size __count, - const _Tp& __value_, - _BinaryPredicate __pred, - random_access_iterator_tag) +_CCCL_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX14 _RandomAccessIterator +__search_n(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Size __count, + const _Tp& __value_, + _BinaryPredicate __pred, + random_access_iterator_tag) { if (__count <= 0) { diff --git a/libcudacxx/include/cuda/std/__atomic/types/base.h b/libcudacxx/include/cuda/std/__atomic/types/base.h index ecee01eb15..fa4b9d7931 100644 --- a/libcudacxx/include/cuda/std/__atomic/types/base.h +++ b/libcudacxx/include/cuda/std/__atomic/types/base.h @@ -98,8 +98,8 @@ _CCCL_HOST_DEVICE inline void __atomic_store_dispatch(_Sto* __a, _Up __val, memo } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_load_dispatch(const _Sto* __a, memory_order __order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_load_dispatch(const _Sto* __a, memory_order __order, _Sco = {}) -> __atomic_underlying_t<_Sto> { NV_DISPATCH_TARGET( NV_IS_DEVICE, @@ -109,8 +109,8 @@ _CCCL_HOST_DEVICE inline auto __atomic_load_dispatch(const _Sto* __a, memory_ord } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_exchange_dispatch(_Sto* __a, _Up __value, memory_order __order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_exchange_dispatch(_Sto* __a, _Up __value, memory_order __order, _Sco = {}) -> __atomic_underlying_t<_Sto> { NV_DISPATCH_TARGET( NV_IS_DEVICE, @@ -160,8 +160,8 @@ _CCCL_HOST_DEVICE inline bool __atomic_compare_exchange_weak_dispatch( } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_fetch_add_dispatch(_Sto* __a, _Up __delta, memory_order __order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_fetch_add_dispatch(_Sto* __a, _Up __delta, memory_order __order, _Sco = {}) -> __atomic_underlying_t<_Sto> { NV_DISPATCH_TARGET( NV_IS_DEVICE, @@ -171,8 +171,8 @@ _CCCL_HOST_DEVICE inline auto __atomic_fetch_add_dispatch(_Sto* __a, _Up __delta } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_fetch_sub_dispatch(_Sto* __a, _Up __delta, memory_order __order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_fetch_sub_dispatch(_Sto* __a, _Up __delta, memory_order __order, _Sco = {}) -> __atomic_underlying_t<_Sto> { NV_DISPATCH_TARGET( NV_IS_DEVICE, @@ -182,8 +182,8 @@ _CCCL_HOST_DEVICE inline auto __atomic_fetch_sub_dispatch(_Sto* __a, _Up __delta } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_fetch_and_dispatch(_Sto* __a, _Up __pattern, memory_order __order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_fetch_and_dispatch(_Sto* __a, _Up __pattern, memory_order __order, _Sco = {}) -> __atomic_underlying_t<_Sto> { NV_DISPATCH_TARGET( NV_IS_DEVICE, @@ -193,8 +193,8 @@ _CCCL_HOST_DEVICE inline auto __atomic_fetch_and_dispatch(_Sto* __a, _Up __patte } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_fetch_or_dispatch(_Sto* __a, _Up __pattern, memory_order __order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_fetch_or_dispatch(_Sto* __a, _Up __pattern, memory_order __order, _Sco = {}) -> __atomic_underlying_t<_Sto> { NV_DISPATCH_TARGET( NV_IS_DEVICE, @@ -204,8 +204,8 @@ _CCCL_HOST_DEVICE inline auto __atomic_fetch_or_dispatch(_Sto* __a, _Up __patter } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_fetch_xor_dispatch(_Sto* __a, _Up __pattern, memory_order __order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_fetch_xor_dispatch(_Sto* __a, _Up __pattern, memory_order __order, _Sco = {}) -> __atomic_underlying_t<_Sto> { NV_DISPATCH_TARGET( NV_IS_DEVICE, @@ -215,8 +215,8 @@ _CCCL_HOST_DEVICE inline auto __atomic_fetch_xor_dispatch(_Sto* __a, _Up __patte } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_fetch_max_dispatch(_Sto* __a, _Up __val, memory_order __order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_fetch_max_dispatch(_Sto* __a, _Up __val, memory_order __order, _Sco = {}) -> __atomic_underlying_t<_Sto> { NV_IF_TARGET( NV_IS_DEVICE, @@ -225,8 +225,8 @@ _CCCL_HOST_DEVICE inline auto __atomic_fetch_max_dispatch(_Sto* __a, _Up __val, } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_fetch_min_dispatch(_Sto* __a, _Up __val, memory_order __order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_fetch_min_dispatch(_Sto* __a, _Up __val, memory_order __order, _Sco = {}) -> __atomic_underlying_t<_Sto> { NV_IF_TARGET( NV_IS_DEVICE, diff --git a/libcudacxx/include/cuda/std/__atomic/types/locked.h b/libcudacxx/include/cuda/std/__atomic/types/locked.h index 1fc5103d2a..e974de913d 100644 --- a/libcudacxx/include/cuda/std/__atomic/types/locked.h +++ b/libcudacxx/include/cuda/std/__atomic/types/locked.h @@ -85,8 +85,8 @@ _CCCL_HOST_DEVICE inline void __atomic_store_dispatch(_Sto* __a, _Up __val, memo } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_load_dispatch(const _Sto* __a, memory_order __order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_load_dispatch(const _Sto* __a, memory_order __order, _Sco = {}) -> __atomic_underlying_t<_Sto> { using _Tp = __atomic_underlying_t<_Sto>; _Tp __old; @@ -97,8 +97,8 @@ _CCCL_HOST_DEVICE inline auto __atomic_load_dispatch(const _Sto* __a, memory_ord } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_exchange_dispatch(_Sto* __a, _Up __value, memory_order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_exchange_dispatch(_Sto* __a, _Up __value, memory_order, _Sco = {}) -> __atomic_underlying_t<_Sto> { using _Tp = __atomic_underlying_t<_Sto>; _Tp __old; @@ -152,8 +152,8 @@ __atomic_compare_exchange_weak_dispatch(_Sto* __a, _Up* __expected, _Up __value, } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_fetch_add_dispatch(_Sto* __a, _Up __delta, memory_order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_fetch_add_dispatch(_Sto* __a, _Up __delta, memory_order, _Sco = {}) -> __atomic_underlying_t<_Sto> { using _Tp = __atomic_underlying_t<_Sto>; _Tp __old; @@ -165,8 +165,8 @@ _CCCL_HOST_DEVICE inline auto __atomic_fetch_add_dispatch(_Sto* __a, _Up __delta } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_fetch_sub_dispatch(_Sto* __a, _Up __delta, memory_order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_fetch_sub_dispatch(_Sto* __a, _Up __delta, memory_order, _Sco = {}) -> __atomic_underlying_t<_Sto> { using _Tp = __atomic_underlying_t<_Sto>; _Tp __old; @@ -178,8 +178,8 @@ _CCCL_HOST_DEVICE inline auto __atomic_fetch_sub_dispatch(_Sto* __a, _Up __delta } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_fetch_and_dispatch(_Sto* __a, _Up __pattern, memory_order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_fetch_and_dispatch(_Sto* __a, _Up __pattern, memory_order, _Sco = {}) -> __atomic_underlying_t<_Sto> { using _Tp = __atomic_underlying_t<_Sto>; _Tp __old; @@ -191,8 +191,8 @@ _CCCL_HOST_DEVICE inline auto __atomic_fetch_and_dispatch(_Sto* __a, _Up __patte } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_fetch_or_dispatch(_Sto* __a, _Up __pattern, memory_order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_fetch_or_dispatch(_Sto* __a, _Up __pattern, memory_order, _Sco = {}) -> __atomic_underlying_t<_Sto> { using _Tp = __atomic_underlying_t<_Sto>; _Tp __old; @@ -204,8 +204,8 @@ _CCCL_HOST_DEVICE inline auto __atomic_fetch_or_dispatch(_Sto* __a, _Up __patter } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_fetch_xor_dispatch(_Sto* __a, _Up __pattern, memory_order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_fetch_xor_dispatch(_Sto* __a, _Up __pattern, memory_order, _Sco = {}) -> __atomic_underlying_t<_Sto> { using _Tp = __atomic_underlying_t<_Sto>; _Tp __old; diff --git a/libcudacxx/include/cuda/std/__atomic/types/small.h b/libcudacxx/include/cuda/std/__atomic/types/small.h index 8f38df5bb0..44d90a6d4e 100644 --- a/libcudacxx/include/cuda/std/__atomic/types/small.h +++ b/libcudacxx/include/cuda/std/__atomic/types/small.h @@ -95,16 +95,16 @@ _CCCL_HOST_DEVICE inline void __atomic_store_dispatch(_Sto* __a, _Up __val, memo } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_load_dispatch(const _Sto* __a, memory_order __order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_load_dispatch(const _Sto* __a, memory_order __order, _Sco = {}) -> __atomic_underlying_t<_Sto> { using _Tp = __atomic_underlying_t<_Sto>; return __atomic_small_from_32<_Tp>(__atomic_load_dispatch(&__a->__a_value, __order, _Sco{})); } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_exchange_dispatch(_Sto* __a, _Up __value, memory_order __order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_exchange_dispatch(_Sto* __a, _Up __value, memory_order __order, _Sco = {}) -> __atomic_underlying_t<_Sto> { using _Tp = __atomic_underlying_t<_Sto>; return __atomic_small_from_32<_Tp>( @@ -155,8 +155,8 @@ _CCCL_HOST_DEVICE inline bool __atomic_compare_exchange_strong_dispatch( } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_fetch_add_dispatch(_Sto* __a, _Up __delta, memory_order __order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_fetch_add_dispatch(_Sto* __a, _Up __delta, memory_order __order, _Sco = {}) -> __atomic_underlying_t<_Sto> { using _Tp = __atomic_underlying_t<_Sto>; return __atomic_small_from_32<_Tp>( @@ -164,8 +164,8 @@ _CCCL_HOST_DEVICE inline auto __atomic_fetch_add_dispatch(_Sto* __a, _Up __delta } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_fetch_sub_dispatch(_Sto* __a, _Up __delta, memory_order __order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_fetch_sub_dispatch(_Sto* __a, _Up __delta, memory_order __order, _Sco = {}) -> __atomic_underlying_t<_Sto> { using _Tp = __atomic_underlying_t<_Sto>; return __atomic_small_from_32<_Tp>( @@ -173,8 +173,8 @@ _CCCL_HOST_DEVICE inline auto __atomic_fetch_sub_dispatch(_Sto* __a, _Up __delta } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_fetch_and_dispatch(_Sto* __a, _Up __pattern, memory_order __order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_fetch_and_dispatch(_Sto* __a, _Up __pattern, memory_order __order, _Sco = {}) -> __atomic_underlying_t<_Sto> { using _Tp = __atomic_underlying_t<_Sto>; return __atomic_small_from_32<_Tp>( @@ -182,8 +182,8 @@ _CCCL_HOST_DEVICE inline auto __atomic_fetch_and_dispatch(_Sto* __a, _Up __patte } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_fetch_or_dispatch(_Sto* __a, _Up __pattern, memory_order __order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_fetch_or_dispatch(_Sto* __a, _Up __pattern, memory_order __order, _Sco = {}) -> __atomic_underlying_t<_Sto> { using _Tp = __atomic_underlying_t<_Sto>; return __atomic_small_from_32<_Tp>( @@ -191,8 +191,8 @@ _CCCL_HOST_DEVICE inline auto __atomic_fetch_or_dispatch(_Sto* __a, _Up __patter } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_fetch_xor_dispatch(_Sto* __a, _Up __pattern, memory_order __order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_fetch_xor_dispatch(_Sto* __a, _Up __pattern, memory_order __order, _Sco = {}) -> __atomic_underlying_t<_Sto> { using _Tp = __atomic_underlying_t<_Sto>; return __atomic_small_from_32<_Tp>( @@ -200,8 +200,8 @@ _CCCL_HOST_DEVICE inline auto __atomic_fetch_xor_dispatch(_Sto* __a, _Up __patte } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_fetch_max_dispatch(_Sto* __a, _Up __val, memory_order __order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_fetch_max_dispatch(_Sto* __a, _Up __val, memory_order __order, _Sco = {}) -> __atomic_underlying_t<_Sto> { using _Tp = __atomic_underlying_t<_Sto>; return __atomic_small_from_32<_Tp>( @@ -209,8 +209,8 @@ _CCCL_HOST_DEVICE inline auto __atomic_fetch_max_dispatch(_Sto* __a, _Up __val, } template = 0> -_CCCL_HOST_DEVICE inline auto __atomic_fetch_min_dispatch(_Sto* __a, _Up __val, memory_order __order, _Sco = {}) - -> __atomic_underlying_t<_Sto> +_CCCL_HOST_DEVICE inline auto +__atomic_fetch_min_dispatch(_Sto* __a, _Up __val, memory_order __order, _Sco = {}) -> __atomic_underlying_t<_Sto> { using _Tp = __atomic_underlying_t<_Sto>; return __atomic_small_from_32<_Tp>( diff --git a/libcudacxx/include/cuda/std/__concepts/__concept_macros.h b/libcudacxx/include/cuda/std/__concepts/__concept_macros.h index 379951d5a1..f38e6c9ac2 100644 --- a/libcudacxx/include/cuda/std/__concepts/__concept_macros.h +++ b/libcudacxx/include/cuda/std/__concepts/__concept_macros.h @@ -209,10 +209,8 @@ # define _LIBCUDACXX_CONCEPT_FRAGMENT_REQS_M0(_REQ) _LIBCUDACXX_CONCEPT_FRAGMENT_REQS_SELECT_(_REQ)(_REQ) # define _LIBCUDACXX_CONCEPT_FRAGMENT_REQS_M1(_REQ) _LIBCUDACXX_PP_EXPAND _REQ -# define _LIBCUDACXX_CONCEPT_FRAGMENT_REQS_(...) \ - { \ - _LIBCUDACXX_PP_FOR_EACH(_LIBCUDACXX_CONCEPT_FRAGMENT_REQS_M, __VA_ARGS__) \ - } +# define _LIBCUDACXX_CONCEPT_FRAGMENT_REQS_(...) \ + {_LIBCUDACXX_PP_FOR_EACH(_LIBCUDACXX_CONCEPT_FRAGMENT_REQS_M, __VA_ARGS__)} # define _LIBCUDACXX_CONCEPT_FRAGMENT_REQS_SELECT_(_REQ) \ _LIBCUDACXX_PP_CAT3( \ _LIBCUDACXX_CONCEPT_FRAGMENT_REQS_SELECT_, \ diff --git a/libcudacxx/include/cuda/std/__concepts/assignable.h b/libcudacxx/include/cuda/std/__concepts/assignable.h index 4ac75e8394..bf570ff59e 100644 --- a/libcudacxx/include/cuda/std/__concepts/assignable.h +++ b/libcudacxx/include/cuda/std/__concepts/assignable.h @@ -37,9 +37,7 @@ template concept assignable_from = is_lvalue_reference_v<_Lhs> && common_reference_with<__make_const_lvalue_ref<_Lhs>, __make_const_lvalue_ref<_Rhs>> && requires(_Lhs __lhs, _Rhs&& __rhs) { - { - __lhs = _CUDA_VSTD::forward<_Rhs>(__rhs) - } -> same_as<_Lhs>; + { __lhs = _CUDA_VSTD::forward<_Rhs>(__rhs) } -> same_as<_Lhs>; }; #elif _CCCL_STD_VER > 2011 diff --git a/libcudacxx/include/cuda/std/__concepts/boolean_testable.h b/libcudacxx/include/cuda/std/__concepts/boolean_testable.h index c0f21db787..003144d068 100644 --- a/libcudacxx/include/cuda/std/__concepts/boolean_testable.h +++ b/libcudacxx/include/cuda/std/__concepts/boolean_testable.h @@ -35,9 +35,7 @@ concept __boolean_testable_impl = convertible_to<_Tp, bool>; template concept __boolean_testable = __boolean_testable_impl<_Tp> && requires(_Tp&& __t) { - { - !_CUDA_VSTD::forward<_Tp>(__t) - } -> __boolean_testable_impl; + { !_CUDA_VSTD::forward<_Tp>(__t) } -> __boolean_testable_impl; }; #elif _CCCL_STD_VER > 2011 diff --git a/libcudacxx/include/cuda/std/__concepts/equality_comparable.h b/libcudacxx/include/cuda/std/__concepts/equality_comparable.h index 13b51907fb..51043f5707 100644 --- a/libcudacxx/include/cuda/std/__concepts/equality_comparable.h +++ b/libcudacxx/include/cuda/std/__concepts/equality_comparable.h @@ -35,18 +35,10 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template concept __weakly_equality_comparable_with = requires(__make_const_lvalue_ref<_Tp> __t, __make_const_lvalue_ref<_Up> __u) { - { - __t == __u - } -> __boolean_testable; - { - __t != __u - } -> __boolean_testable; - { - __u == __t - } -> __boolean_testable; - { - __u != __t - } -> __boolean_testable; + { __t == __u } -> __boolean_testable; + { __t != __u } -> __boolean_testable; + { __u == __t } -> __boolean_testable; + { __u != __t } -> __boolean_testable; }; template diff --git a/libcudacxx/include/cuda/std/__concepts/swappable.h b/libcudacxx/include/cuda/std/__concepts/swappable.h index a477387327..adf54861dc 100644 --- a/libcudacxx/include/cuda/std/__concepts/swappable.h +++ b/libcudacxx/include/cuda/std/__concepts/swappable.h @@ -55,9 +55,8 @@ void swap(_Tp&, _Tp&) = delete; # if _CCCL_STD_VER > 2017 template concept __unqualified_swappable_with = - (__class_or_enum> || __class_or_enum>) &&requires(_Tp&& __t, _Up&& __u) { - swap(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u)); - }; + (__class_or_enum> || __class_or_enum>) + && requires(_Tp&& __t, _Up&& __u) { swap(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u)); }; template concept __exchangeable = diff --git a/libcudacxx/include/cuda/std/__concepts/totally_ordered.h b/libcudacxx/include/cuda/std/__concepts/totally_ordered.h index 844380a21f..fb4339b4d5 100644 --- a/libcudacxx/include/cuda/std/__concepts/totally_ordered.h +++ b/libcudacxx/include/cuda/std/__concepts/totally_ordered.h @@ -34,30 +34,14 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template concept __partially_ordered_with = requires(__make_const_lvalue_ref<_Tp> __t, __make_const_lvalue_ref<_Up> __u) { - { - __t < __u - } -> __boolean_testable; - { - __t > __u - } -> __boolean_testable; - { - __t <= __u - } -> __boolean_testable; - { - __t >= __u - } -> __boolean_testable; - { - __u < __t - } -> __boolean_testable; - { - __u > __t - } -> __boolean_testable; - { - __u <= __t - } -> __boolean_testable; - { - __u >= __t - } -> __boolean_testable; + { __t < __u } -> __boolean_testable; + { __t > __u } -> __boolean_testable; + { __t <= __u } -> __boolean_testable; + { __t >= __u } -> __boolean_testable; + { __u < __t } -> __boolean_testable; + { __u > __t } -> __boolean_testable; + { __u <= __t } -> __boolean_testable; + { __u >= __t } -> __boolean_testable; }; template diff --git a/libcudacxx/include/cuda/std/__expected/expected.h b/libcudacxx/include/cuda/std/__expected/expected.h index 5166aafaa7..ab63a50fb7 100644 --- a/libcudacxx/include/cuda/std/__expected/expected.h +++ b/libcudacxx/include/cuda/std/__expected/expected.h @@ -128,8 +128,8 @@ class expected : private __expected_move_assign<_Tp, _Err> // [expected.object.ctor], constructors _LIBCUDACXX_TEMPLATE(class _Tp2 = _Tp) _LIBCUDACXX_REQUIRES(_CCCL_TRAIT(is_default_constructible, _Tp2)) - _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr expected() noexcept( - _CCCL_TRAIT(is_nothrow_default_constructible, _Tp2)) + _LIBCUDACXX_HIDE_FROM_ABI + _LIBCUDACXX_INLINE_VISIBILITY constexpr expected() noexcept(_CCCL_TRAIT(is_nothrow_default_constructible, _Tp2)) : __base(true) {} @@ -179,10 +179,10 @@ class expected : private __expected_move_assign<_Tp, _Err> _LIBCUDACXX_TEMPLATE(class _Up, class _OtherErr) _LIBCUDACXX_REQUIRES(__can_convert<_Up, _OtherErr, const _Up&, const _OtherErr&>::value _LIBCUDACXX_AND( !_CCCL_TRAIT(is_convertible, const _Up&, _Tp) || !_CCCL_TRAIT(is_convertible, const _OtherErr&, _Err))) - _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 explicit expected( - const expected<_Up, _OtherErr>& - __other) noexcept(_CCCL_TRAIT(is_nothrow_constructible, _Tp, const _Up&) - && _CCCL_TRAIT(is_nothrow_constructible, _Err, const _OtherErr&)) // strengthened + _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY + _CCCL_CONSTEXPR_CXX20 explicit expected(const expected<_Up, _OtherErr>& __other) noexcept( + _CCCL_TRAIT(is_nothrow_constructible, _Tp, const _Up&) + && _CCCL_TRAIT(is_nothrow_constructible, _Err, const _OtherErr&)) // strengthened : __base(__other.__has_val_) { if (__other.__has_val_) @@ -217,10 +217,10 @@ class expected : private __expected_move_assign<_Tp, _Err> _LIBCUDACXX_TEMPLATE(class _Up, class _OtherErr) _LIBCUDACXX_REQUIRES(__can_convert<_Up, _OtherErr, _Up, _OtherErr>::value _LIBCUDACXX_AND( !_CCCL_TRAIT(is_convertible, _Up, _Tp) || !_CCCL_TRAIT(is_convertible, _OtherErr, _Err))) - _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 explicit expected( - expected<_Up, _OtherErr>&& - __other) noexcept(_CCCL_TRAIT(is_nothrow_constructible, _Tp, _Up) - && _CCCL_TRAIT(is_nothrow_constructible, _Err, _OtherErr)) // strengthened + _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY + _CCCL_CONSTEXPR_CXX20 explicit expected(expected<_Up, _OtherErr>&& __other) noexcept( + _CCCL_TRAIT(is_nothrow_constructible, _Tp, _Up) + && _CCCL_TRAIT(is_nothrow_constructible, _Err, _OtherErr)) // strengthened : __base(__other.__has_val_) { if (__other.__has_val_) @@ -256,18 +256,18 @@ class expected : private __expected_move_assign<_Tp, _Err> _LIBCUDACXX_TEMPLATE(class _OtherErr) _LIBCUDACXX_REQUIRES(_CCCL_TRAIT(is_constructible, _Err, const _OtherErr&) _LIBCUDACXX_AND _CCCL_TRAIT(is_convertible, const _OtherErr&, _Err)) - _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr expected( - const unexpected<_OtherErr>& - __unex) noexcept(_CCCL_TRAIT(is_nothrow_constructible, _Err, const _OtherErr&)) // strengthened + _LIBCUDACXX_HIDE_FROM_ABI + _LIBCUDACXX_INLINE_VISIBILITY constexpr expected(const unexpected<_OtherErr>& __unex) noexcept( + _CCCL_TRAIT(is_nothrow_constructible, _Err, const _OtherErr&)) // strengthened : __base(unexpect, __unex.error()) {} _LIBCUDACXX_TEMPLATE(class _OtherErr) _LIBCUDACXX_REQUIRES(_CCCL_TRAIT(is_constructible, _Err, const _OtherErr&) _LIBCUDACXX_AND(!_CCCL_TRAIT(is_convertible, const _OtherErr&, _Err))) - _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr explicit expected( - const unexpected<_OtherErr>& - __unex) noexcept(_CCCL_TRAIT(is_nothrow_constructible, _Err, const _OtherErr&)) // strengthened + _LIBCUDACXX_HIDE_FROM_ABI + _LIBCUDACXX_INLINE_VISIBILITY constexpr explicit expected(const unexpected<_OtherErr>& __unex) noexcept( + _CCCL_TRAIT(is_nothrow_constructible, _Err, const _OtherErr&)) // strengthened : __base(unexpect, __unex.error()) {} @@ -1260,9 +1260,9 @@ class expected : private __expected_move_assign _LIBCUDACXX_TEMPLATE(class _Up, class _OtherErr) _LIBCUDACXX_REQUIRES(__can_convert<_Up, _OtherErr, const _OtherErr&>::value _LIBCUDACXX_AND( !_CCCL_TRAIT(is_convertible, const _OtherErr&, _Err))) - _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 explicit expected( - const expected<_Up, _OtherErr>& - __other) noexcept(_CCCL_TRAIT(is_nothrow_constructible, _Err, const _OtherErr&)) // strengthened + _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY + _CCCL_CONSTEXPR_CXX20 explicit expected(const expected<_Up, _OtherErr>& __other) noexcept( + _CCCL_TRAIT(is_nothrow_constructible, _Err, const _OtherErr&)) // strengthened : __base(__other.__has_val_) { if (!__other.__has_val_) @@ -1300,18 +1300,18 @@ class expected : private __expected_move_assign _LIBCUDACXX_TEMPLATE(class _OtherErr) _LIBCUDACXX_REQUIRES(_CCCL_TRAIT(is_constructible, _Err, const _OtherErr&) _LIBCUDACXX_AND _CCCL_TRAIT(is_convertible, const _OtherErr&, _Err)) - _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr expected( - const unexpected<_OtherErr>& - __unex) noexcept(_CCCL_TRAIT(is_nothrow_constructible, _Err, const _OtherErr&)) // strengthened + _LIBCUDACXX_HIDE_FROM_ABI + _LIBCUDACXX_INLINE_VISIBILITY constexpr expected(const unexpected<_OtherErr>& __unex) noexcept( + _CCCL_TRAIT(is_nothrow_constructible, _Err, const _OtherErr&)) // strengthened : __base(unexpect, __unex.error()) {} _LIBCUDACXX_TEMPLATE(class _OtherErr) _LIBCUDACXX_REQUIRES(_CCCL_TRAIT(is_constructible, _Err, const _OtherErr&) _LIBCUDACXX_AND(!_CCCL_TRAIT(is_convertible, const _OtherErr&, _Err))) - _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr explicit expected( - const unexpected<_OtherErr>& - __unex) noexcept(_CCCL_TRAIT(is_nothrow_constructible, _Err, const _OtherErr&)) // strengthened + _LIBCUDACXX_HIDE_FROM_ABI + _LIBCUDACXX_INLINE_VISIBILITY constexpr explicit expected(const unexpected<_OtherErr>& __unex) noexcept( + _CCCL_TRAIT(is_nothrow_constructible, _Err, const _OtherErr&)) // strengthened : __base(unexpect, __unex.error()) {} diff --git a/libcudacxx/include/cuda/std/__functional/bind.h b/libcudacxx/include/cuda/std/__functional/bind.h index 645ca9c7aa..fd7970a3e7 100644 --- a/libcudacxx/include/cuda/std/__functional/bind.h +++ b/libcudacxx/include/cuda/std/__functional/bind.h @@ -138,17 +138,17 @@ struct __mu_return2 template inline _LIBCUDACXX_INLINE_VISIBILITY - __enable_if_t<0 < is_placeholder<_Ti>::value, typename __mu_return2<0 < is_placeholder<_Ti>::value, _Ti, _Uj>::type> - __mu(_Ti&, _Uj& __uj) +__enable_if_t<0 < is_placeholder<_Ti>::value, typename __mu_return2<0 < is_placeholder<_Ti>::value, _Ti, _Uj>::type> +__mu(_Ti&, _Uj& __uj) { const size_t _Indx = is_placeholder<_Ti>::value - 1; return _CUDA_VSTD::forward<__tuple_element_t<_Indx, _Uj>>(_CUDA_VSTD::get<_Indx>(__uj)); } template -inline _LIBCUDACXX_INLINE_VISIBILITY __enable_if_t< - !is_bind_expression<_Ti>::value && is_placeholder<_Ti>::value == 0 && !__is_reference_wrapper<_Ti>::value, - _Ti&> +inline _LIBCUDACXX_INLINE_VISIBILITY +__enable_if_t::value && is_placeholder<_Ti>::value == 0 && !__is_reference_wrapper<_Ti>::value, + _Ti&> __mu(_Ti& __ti, _Uj&) { return __ti; @@ -308,9 +308,9 @@ class __bind_r : public __bind<_Fp, _BoundArgs...> {} template - _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 __enable_if_t< - is_convertible<__bind_return_t<_Fd, _Td, tuple<_Args&&...>>, result_type>::value || is_void<_Rp>::value, - result_type> + _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 + __enable_if_t>, result_type>::value || is_void<_Rp>::value, + result_type> operator()(_Args&&... __args) { typedef __invoke_void_return_wrapper<_Rp> _Invoker; diff --git a/libcudacxx/include/cuda/std/__functional/invoke.h b/libcudacxx/include/cuda/std/__functional/invoke.h index 2dee9324e9..0e132158f5 100644 --- a/libcudacxx/include/cuda/std/__functional/invoke.h +++ b/libcudacxx/include/cuda/std/__functional/invoke.h @@ -407,8 +407,8 @@ struct __invokable_r using _Result = decltype(__try_call<_Fp, _Args...>(0)); using type = __conditional_t<_IsNotSame<_Result, __nat>::value, - __conditional_t::value, true_type, __is_core_convertible<_Result, _Ret>>, - false_type>; + __conditional_t::value, true_type, __is_core_convertible<_Result, _Ret>>, + false_type>; static const bool value = type::value; }; template diff --git a/libcudacxx/include/cuda/std/__functional/mem_fun_ref.h b/libcudacxx/include/cuda/std/__functional/mem_fun_ref.h index 4bc68368ca..c096350d06 100644 --- a/libcudacxx/include/cuda/std/__functional/mem_fun_ref.h +++ b/libcudacxx/include/cuda/std/__functional/mem_fun_ref.h @@ -118,8 +118,8 @@ mem_fun_ref(_Sp (_Tp::*__f)(_Ap)) } template -class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 const_mem_fun_t - : public __unary_function +class _LIBCUDACXX_TEMPLATE_VIS +_LIBCUDACXX_DEPRECATED_IN_CXX11 const_mem_fun_t : public __unary_function { _Sp (_Tp::*__p_)() const; @@ -134,8 +134,8 @@ class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 const_mem_fun_t }; template -class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 const_mem_fun1_t - : public __binary_function +class _LIBCUDACXX_TEMPLATE_VIS +_LIBCUDACXX_DEPRECATED_IN_CXX11 const_mem_fun1_t : public __binary_function { _Sp (_Tp::*__p_)(_Ap) const; @@ -179,8 +179,8 @@ class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 const_mem_fun_ref }; template -class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 const_mem_fun1_ref_t - : public __binary_function<_Tp, _Ap, _Sp> +class _LIBCUDACXX_TEMPLATE_VIS +_LIBCUDACXX_DEPRECATED_IN_CXX11 const_mem_fun1_ref_t : public __binary_function<_Tp, _Ap, _Sp> { _Sp (_Tp::*__p_)(_Ap) const; diff --git a/libcudacxx/include/cuda/std/__functional/pointer_to_binary_function.h b/libcudacxx/include/cuda/std/__functional/pointer_to_binary_function.h index f15f019326..09838d9b82 100644 --- a/libcudacxx/include/cuda/std/__functional/pointer_to_binary_function.h +++ b/libcudacxx/include/cuda/std/__functional/pointer_to_binary_function.h @@ -30,8 +30,8 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD _CCCL_SUPPRESS_DEPRECATED_PUSH template -class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 pointer_to_binary_function - : public __binary_function<_Arg1, _Arg2, _Result> +class _LIBCUDACXX_TEMPLATE_VIS +_LIBCUDACXX_DEPRECATED_IN_CXX11 pointer_to_binary_function : public __binary_function<_Arg1, _Arg2, _Result> { _Result (*__f_)(_Arg1, _Arg2); diff --git a/libcudacxx/include/cuda/std/__functional/pointer_to_unary_function.h b/libcudacxx/include/cuda/std/__functional/pointer_to_unary_function.h index 65709c10f6..c4d1caa8f0 100644 --- a/libcudacxx/include/cuda/std/__functional/pointer_to_unary_function.h +++ b/libcudacxx/include/cuda/std/__functional/pointer_to_unary_function.h @@ -30,8 +30,8 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD _CCCL_SUPPRESS_DEPRECATED_PUSH template -class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 pointer_to_unary_function - : public __unary_function<_Arg, _Result> +class _LIBCUDACXX_TEMPLATE_VIS +_LIBCUDACXX_DEPRECATED_IN_CXX11 pointer_to_unary_function : public __unary_function<_Arg, _Result> { _Result (*__f_)(_Arg); diff --git a/libcudacxx/include/cuda/std/__functional/unary_negate.h b/libcudacxx/include/cuda/std/__functional/unary_negate.h index 06c0ae52bc..47b8291300 100644 --- a/libcudacxx/include/cuda/std/__functional/unary_negate.h +++ b/libcudacxx/include/cuda/std/__functional/unary_negate.h @@ -30,8 +30,8 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD _CCCL_SUPPRESS_DEPRECATED_PUSH template -class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX17 unary_negate - : public __unary_function +class _LIBCUDACXX_TEMPLATE_VIS +_LIBCUDACXX_DEPRECATED_IN_CXX17 unary_negate : public __unary_function { _Predicate __pred_; diff --git a/libcudacxx/include/cuda/std/__fwd/get.h b/libcudacxx/include/cuda/std/__fwd/get.h index 7ff8133332..63eab4ea11 100644 --- a/libcudacxx/include/cuda/std/__fwd/get.h +++ b/libcudacxx/include/cuda/std/__fwd/get.h @@ -89,8 +89,8 @@ template ) || (_Index == 1), int> = 0> # endif // _CCCL_STD_VER <= 2017 -_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr auto get( - const subrange<_Iter, _Sent, _Kind>& __subrange); +_LIBCUDACXX_HIDE_FROM_ABI +_LIBCUDACXX_INLINE_VISIBILITY constexpr auto get(const subrange<_Iter, _Sent, _Kind>& __subrange); # if _CCCL_STD_VER >= 2020 template diff --git a/libcudacxx/include/cuda/std/__iterator/access.h b/libcudacxx/include/cuda/std/__iterator/access.h index 4f3ecc13b3..f720e7730d 100644 --- a/libcudacxx/include/cuda/std/__iterator/access.h +++ b/libcudacxx/include/cuda/std/__iterator/access.h @@ -36,8 +36,8 @@ struct __fn } template - _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 auto operator()(_Cp& __c) const noexcept(noexcept(__c.begin())) - -> decltype(__c.begin()) + _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 auto operator()(_Cp& __c) const + noexcept(noexcept(__c.begin())) -> decltype(__c.begin()) { return __c.begin(); } @@ -67,8 +67,8 @@ struct __fn } template - _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 auto operator()(_Cp& __c) const noexcept(noexcept(__c.end())) - -> decltype(__c.end()) + _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 auto operator()(_Cp& __c) const + noexcept(noexcept(__c.end())) -> decltype(__c.end()) { return __c.end(); } diff --git a/libcudacxx/include/cuda/std/__iterator/bounded_iter.h b/libcudacxx/include/cuda/std/__iterator/bounded_iter.h index 9d9034ff99..4e754d6b27 100644 --- a/libcudacxx/include/cuda/std/__iterator/bounded_iter.h +++ b/libcudacxx/include/cuda/std/__iterator/bounded_iter.h @@ -62,8 +62,8 @@ struct __bounded_iter __bounded_iter(__bounded_iter&&) = default; template ::value>> - _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr __bounded_iter( - __bounded_iter<_OtherIterator> const& __other) noexcept + _LIBCUDACXX_HIDE_FROM_ABI + _LIBCUDACXX_INLINE_VISIBILITY constexpr __bounded_iter(__bounded_iter<_OtherIterator> const& __other) noexcept : __current_(__other.__current_) , __begin_(__other.__begin_) , __end_(__other.__end_) @@ -83,8 +83,8 @@ struct __bounded_iter // // Since it is non-standard for iterators to have this constructor, __bounded_iter must // be created via `_CUDA_VSTD::__make_bounded_iter`. - _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 explicit __bounded_iter( - _Iterator __current, _Iterator __begin, _Iterator __end) + _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY + _CCCL_CONSTEXPR_CXX14 explicit __bounded_iter(_Iterator __current, _Iterator __begin, _Iterator __end) : __current_(__current) , __begin_(__begin) , __end_(__end) diff --git a/libcudacxx/include/cuda/std/__iterator/concepts.h b/libcudacxx/include/cuda/std/__iterator/concepts.h index b0e26070fd..996f1a96fa 100644 --- a/libcudacxx/include/cuda/std/__iterator/concepts.h +++ b/libcudacxx/include/cuda/std/__iterator/concepts.h @@ -62,12 +62,8 @@ concept __indirectly_readable_impl = typename iter_value_t<_In>; typename iter_reference_t<_In>; typename iter_rvalue_reference_t<_In>; - { - *__i - } -> same_as>; - { - _CUDA_VRANGES::iter_move(__i) - } -> same_as>; + { *__i } -> same_as>; + { _CUDA_VRANGES::iter_move(__i) } -> same_as>; } && common_reference_with&&, iter_value_t<_In>&> && common_reference_with&&, iter_rvalue_reference_t<_In>&&> && common_reference_with&&, const iter_value_t<_In>&>; @@ -103,26 +99,20 @@ concept weakly_incrementable = movable<_Ip> && requires(_Ip __i) { typename iter_difference_t<_Ip>; requires __signed_integer_like>; - { - ++__i - } -> same_as<_Ip&>; // not required to be equality-preserving + { ++__i } -> same_as<_Ip&>; // not required to be equality-preserving __i++; // not required to be equality-preserving }; // [iterator.concept.inc] template concept incrementable = regular<_Ip> && weakly_incrementable<_Ip> && requires(_Ip __i) { - { - __i++ - } -> same_as<_Ip>; + { __i++ } -> same_as<_Ip>; }; // [iterator.concept.iterator] template concept input_or_output_iterator = requires(_Ip __i) { - { - *__i - } -> __can_reference; + { *__i } -> __can_reference; } && weakly_incrementable<_Ip>; // [iterator.concept.sentinel] @@ -136,12 +126,8 @@ template concept sized_sentinel_for = sentinel_for<_Sp, _Ip> && !disable_sized_sentinel_for, remove_cv_t<_Ip>> && requires(const _Ip& __i, const _Sp& __s) { - { - __s - __i - } -> same_as>; - { - __i - __s - } -> same_as>; + { __s - __i } -> same_as>; + { __i - __s } -> same_as>; }; // [iterator.concept.input] @@ -166,36 +152,20 @@ concept forward_iterator = input_iterator<_Ip> && derived_from<_ITER_CONCEPT<_Ip template concept bidirectional_iterator = forward_iterator<_Ip> && derived_from<_ITER_CONCEPT<_Ip>, bidirectional_iterator_tag> && requires(_Ip __i) { - { - --__i - } -> same_as<_Ip&>; - { - __i-- - } -> same_as<_Ip>; + { --__i } -> same_as<_Ip&>; + { __i-- } -> same_as<_Ip>; }; template concept random_access_iterator = bidirectional_iterator<_Ip> && derived_from<_ITER_CONCEPT<_Ip>, random_access_iterator_tag> && totally_ordered<_Ip> && sized_sentinel_for<_Ip, _Ip> && requires(_Ip __i, const _Ip __j, const iter_difference_t<_Ip> __n) { - { - __i += __n - } -> same_as<_Ip&>; - { - __j + __n - } -> same_as<_Ip>; - { - __n + __j - } -> same_as<_Ip>; - { - __i -= __n - } -> same_as<_Ip&>; - { - __j - __n - } -> same_as<_Ip>; - { - __j[__n] - } -> same_as>; + { __i += __n } -> same_as<_Ip&>; + { __j + __n } -> same_as<_Ip>; + { __n + __j } -> same_as<_Ip>; + { __i -= __n } -> same_as<_Ip&>; + { __j - __n } -> same_as<_Ip>; + { __j[__n] } -> same_as>; }; template @@ -203,9 +173,7 @@ concept contiguous_iterator = random_access_iterator<_Ip> && derived_from<_ITER_CONCEPT<_Ip>, contiguous_iterator_tag> && is_lvalue_reference_v> && same_as, remove_cvref_t>> && requires(const _Ip& __i) { - { - _CUDA_VSTD::to_address(__i) - } -> same_as>>; + { _CUDA_VSTD::to_address(__i) } -> same_as>>; }; template diff --git a/libcudacxx/include/cuda/std/__iterator/data.h b/libcudacxx/include/cuda/std/__iterator/data.h index f96d4a3503..97dad1d0ff 100644 --- a/libcudacxx/include/cuda/std/__iterator/data.h +++ b/libcudacxx/include/cuda/std/__iterator/data.h @@ -35,8 +35,8 @@ constexpr _LIBCUDACXX_INLINE_VISIBILITY auto data(_Cont& __c) noexcept(noexcept( } template -constexpr _LIBCUDACXX_INLINE_VISIBILITY auto data(const _Cont& __c) noexcept(noexcept(__c.data())) - -> decltype(__c.data()) +constexpr _LIBCUDACXX_INLINE_VISIBILITY auto +data(const _Cont& __c) noexcept(noexcept(__c.data())) -> decltype(__c.data()) { return __c.data(); } diff --git a/libcudacxx/include/cuda/std/__iterator/empty.h b/libcudacxx/include/cuda/std/__iterator/empty.h index e552fac335..2052800a31 100644 --- a/libcudacxx/include/cuda/std/__iterator/empty.h +++ b/libcudacxx/include/cuda/std/__iterator/empty.h @@ -29,8 +29,8 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD #if _CCCL_STD_VER > 2011 template -_CCCL_NODISCARD _LIBCUDACXX_INLINE_VISIBILITY constexpr auto empty(const _Cont& __c) noexcept(noexcept(__c.empty())) - -> decltype(__c.empty()) +_CCCL_NODISCARD _LIBCUDACXX_INLINE_VISIBILITY constexpr auto +empty(const _Cont& __c) noexcept(noexcept(__c.empty())) -> decltype(__c.empty()) { return __c.empty(); } diff --git a/libcudacxx/include/cuda/std/__iterator/incrementable_traits.h b/libcudacxx/include/cuda/std/__iterator/incrementable_traits.h index 374be59fc9..55d7f360e1 100644 --- a/libcudacxx/include/cuda/std/__iterator/incrementable_traits.h +++ b/libcudacxx/include/cuda/std/__iterator/incrementable_traits.h @@ -66,9 +66,7 @@ struct incrementable_traits<_Tp> template concept __has_integral_minus = requires(const _Tp& __x, const _Tp& __y) { - { - __x - __y - } -> integral; + { __x - __y } -> integral; }; template <__has_integral_minus _Tp> diff --git a/libcudacxx/include/cuda/std/__iterator/iter_move.h b/libcudacxx/include/cuda/std/__iterator/iter_move.h index 0a6609c22c..d447e29fa0 100644 --- a/libcudacxx/include/cuda/std/__iterator/iter_move.h +++ b/libcudacxx/include/cuda/std/__iterator/iter_move.h @@ -102,9 +102,8 @@ struct __fn _LIBCUDACXX_TEMPLATE(class _Ip) _LIBCUDACXX_REQUIRES(__move_deref<_Ip>) - _CCCL_NODISCARD _LIBCUDACXX_INLINE_VISIBILITY constexpr auto operator()(_Ip&& __i) const - noexcept(noexcept(_CUDA_VSTD::move(*_CUDA_VSTD::forward<_Ip>(__i)))) - -> decltype(_CUDA_VSTD::move(*_CUDA_VSTD::forward<_Ip>(__i))) + _CCCL_NODISCARD _LIBCUDACXX_INLINE_VISIBILITY constexpr auto operator()(_Ip&& __i) const noexcept(noexcept( + _CUDA_VSTD::move(*_CUDA_VSTD::forward<_Ip>(__i)))) -> decltype(_CUDA_VSTD::move(*_CUDA_VSTD::forward<_Ip>(__i))) { return _CUDA_VSTD::move(*_CUDA_VSTD::forward<_Ip>(__i)); } @@ -129,9 +128,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD # if _CCCL_STD_VER >= 2020 template <__dereferenceable _Tp> requires requires(_Tp& __t) { - { - _CUDA_VRANGES::iter_move(__t) - } -> __can_reference; + { _CUDA_VRANGES::iter_move(__t) } -> __can_reference; } using iter_rvalue_reference_t = decltype(_CUDA_VRANGES::iter_move(_CUDA_VSTD::declval<_Tp&>())); diff --git a/libcudacxx/include/cuda/std/__iterator/iter_swap.h b/libcudacxx/include/cuda/std/__iterator/iter_swap.h index c4f67b8cab..76d02c6989 100644 --- a/libcudacxx/include/cuda/std/__iterator/iter_swap.h +++ b/libcudacxx/include/cuda/std/__iterator/iter_swap.h @@ -42,9 +42,8 @@ void iter_swap(_I1, _I2) = delete; # if _CCCL_STD_VER > 2017 template concept __unqualified_iter_swap = - (__class_or_enum> || __class_or_enum>) &&requires(_T1&& __x, _T2&& __y) { - iter_swap(_CUDA_VSTD::forward<_T1>(__x), _CUDA_VSTD::forward<_T2>(__y)); - }; + (__class_or_enum> || __class_or_enum>) + && requires(_T1&& __x, _T2&& __y) { iter_swap(_CUDA_VSTD::forward<_T1>(__x), _CUDA_VSTD::forward<_T2>(__y)); }; template concept __readable_swappable = !__unqualified_iter_swap<_T1, _T2> && indirectly_readable<_T1> @@ -107,9 +106,9 @@ struct __fn _LIBCUDACXX_TEMPLATE(class _T1, class _T2) _LIBCUDACXX_REQUIRES(__moveable_storable<_T2, _T1>) _LIBCUDACXX_INLINE_VISIBILITY constexpr void operator()(_T1&& __x, _T2&& __y) const - noexcept(noexcept(iter_value_t<_T2>(_CUDA_VRANGES::iter_move( - __y))) && noexcept(*__y = _CUDA_VRANGES::iter_move(__x)) && noexcept(*_CUDA_VSTD::forward<_T1>(__x) = - declval>())) + noexcept(noexcept(iter_value_t<_T2>(_CUDA_VRANGES::iter_move(__y))) + && noexcept(*__y = _CUDA_VRANGES::iter_move(__x)) + && noexcept(*_CUDA_VSTD::forward<_T1>(__x) = declval>())) { iter_value_t<_T2> __old(_CUDA_VRANGES::iter_move(__y)); *__y = _CUDA_VRANGES::iter_move(__x); diff --git a/libcudacxx/include/cuda/std/__iterator/iterator_traits.h b/libcudacxx/include/cuda/std/__iterator/iterator_traits.h index c86d61dbe0..56023c3cfd 100644 --- a/libcudacxx/include/cuda/std/__iterator/iterator_traits.h +++ b/libcudacxx/include/cuda/std/__iterator/iterator_traits.h @@ -77,9 +77,7 @@ concept __can_reference = requires { typename __with_reference<_Tp>; }; template concept __dereferenceable = requires(_Tp& __t) { - { - *__t - } -> __can_reference; // not required to be equality-preserving + { *__t } -> __can_reference; // not required to be equality-preserving }; // [iterator.traits] @@ -253,15 +251,9 @@ namespace __iterator_traits_detail { template concept __cpp17_iterator = requires(_Ip __i) { - { - *__i - } -> __can_reference; - { - ++__i - } -> same_as<_Ip&>; - { - *__i++ - } -> __can_reference; + { *__i } -> __can_reference; + { ++__i } -> same_as<_Ip&>; + { *__i++ } -> __can_reference; } && copyable<_Ip>; template @@ -278,52 +270,28 @@ concept __cpp17_forward_iterator = __cpp17_input_iterator<_Ip> && constructible_from<_Ip> && is_lvalue_reference_v> && same_as>, typename indirectly_readable_traits<_Ip>::value_type> && requires(_Ip __i) { - { - __i++ - } -> convertible_to<_Ip const&>; - { - *__i++ - } -> same_as>; + { __i++ } -> convertible_to<_Ip const&>; + { *__i++ } -> same_as>; }; template concept __cpp17_bidirectional_iterator = __cpp17_forward_iterator<_Ip> && requires(_Ip __i) { - { - --__i - } -> same_as<_Ip&>; - { - __i-- - } -> convertible_to<_Ip const&>; - { - *__i-- - } -> same_as>; + { --__i } -> same_as<_Ip&>; + { __i-- } -> convertible_to<_Ip const&>; + { *__i-- } -> same_as>; }; template concept __cpp17_random_access_iterator = __cpp17_bidirectional_iterator<_Ip> && totally_ordered<_Ip> && requires(_Ip __i, typename incrementable_traits<_Ip>::difference_type __n) { - { - __i += __n - } -> same_as<_Ip&>; - { - __i -= __n - } -> same_as<_Ip&>; - { - __i + __n - } -> same_as<_Ip>; - { - __n + __i - } -> same_as<_Ip>; - { - __i - __n - } -> same_as<_Ip>; - { - __i - __i - } -> same_as; // NOLINT(misc-redundant-expression) ; This is llvm.org/PR54114 - { - __i[__n] - } -> convertible_to>; + { __i += __n } -> same_as<_Ip&>; + { __i -= __n } -> same_as<_Ip&>; + { __i + __n } -> same_as<_Ip>; + { __n + __i } -> same_as<_Ip>; + { __i - __n } -> same_as<_Ip>; + { __i - __i } -> same_as; // NOLINT(misc-redundant-expression) ; This is llvm.org/PR54114 + { __i[__n] } -> convertible_to>; }; } // namespace __iterator_traits_detail diff --git a/libcudacxx/include/cuda/std/__iterator/move_iterator.h b/libcudacxx/include/cuda/std/__iterator/move_iterator.h index 22b1bb2a27..ef46b42074 100644 --- a/libcudacxx/include/cuda/std/__iterator/move_iterator.h +++ b/libcudacxx/include/cuda/std/__iterator/move_iterator.h @@ -62,9 +62,7 @@ struct __move_iter_category_base<_Iter> template concept __move_iter_comparable = requires { - { - declval() == declval<_Sent>() - } -> convertible_to; + { declval() == declval<_Sent>() } -> convertible_to; }; template @@ -434,9 +432,8 @@ operator!=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) #ifndef _LIBCUDACXX_HAS_NO_SPACESHIP_OPERATOR template _Iter2> -inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr auto -operator<=>(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) - -> compare_three_way_result_t<_Iter1, _Iter2> +inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr auto operator<=>( + const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y) -> compare_three_way_result_t<_Iter1, _Iter2> { return __x.base() <=> __y.base(); } @@ -483,9 +480,7 @@ template inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr move_iterator<_Iter> operator+(iter_difference_t<_Iter> __n, const move_iterator<_Iter>& __x) requires requires { - { - __x.base() + __n - } -> same_as<_Iter>; + { __x.base() + __n } -> same_as<_Iter>; } { return __x + __n; diff --git a/libcudacxx/include/cuda/std/__iterator/next.h b/libcudacxx/include/cuda/std/__iterator/next.h index 4feb69623a..5adfee7270 100644 --- a/libcudacxx/include/cuda/std/__iterator/next.h +++ b/libcudacxx/include/cuda/std/__iterator/next.h @@ -31,9 +31,9 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -inline _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value, _InputIter> - next(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = 1) +inline _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX14 __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value, _InputIter> +next(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = 1) { _LIBCUDACXX_ASSERT(__n >= 0 || __is_cpp17_bidirectional_iterator<_InputIter>::value, "Attempt to next(it, n) with negative n on a non-bidirectional iterator"); diff --git a/libcudacxx/include/cuda/std/__iterator/prev.h b/libcudacxx/include/cuda/std/__iterator/prev.h index 2935caa814..9d8255ec62 100644 --- a/libcudacxx/include/cuda/std/__iterator/prev.h +++ b/libcudacxx/include/cuda/std/__iterator/prev.h @@ -31,9 +31,9 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -inline _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value, _InputIter> - prev(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = 1) +inline _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX14 __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value, _InputIter> +prev(_InputIter __x, typename iterator_traits<_InputIter>::difference_type __n = 1) { _LIBCUDACXX_ASSERT(__n <= 0 || __is_cpp17_bidirectional_iterator<_InputIter>::value, "Attempt to prev(it, +n) on a non-bidi iterator"); diff --git a/libcudacxx/include/cuda/std/__iterator/reverse_access.h b/libcudacxx/include/cuda/std/__iterator/reverse_access.h index b68f972487..5ef118b11c 100644 --- a/libcudacxx/include/cuda/std/__iterator/reverse_access.h +++ b/libcudacxx/include/cuda/std/__iterator/reverse_access.h @@ -48,8 +48,8 @@ struct __fn } template - _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 auto operator()(_Cp& __c) const noexcept(noexcept(__c.rbegin())) - -> decltype(__c.rbegin()) + _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 auto operator()(_Cp& __c) const + noexcept(noexcept(__c.rbegin())) -> decltype(__c.rbegin()) { return __c.rbegin(); } @@ -87,8 +87,8 @@ struct __fn } template - _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 auto operator()(_Cp& __c) const noexcept(noexcept(__c.rend())) - -> decltype(__c.rend()) + _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 auto operator()(_Cp& __c) const + noexcept(noexcept(__c.rend())) -> decltype(__c.rend()) { return __c.rend(); } diff --git a/libcudacxx/include/cuda/std/__iterator/reverse_iterator.h b/libcudacxx/include/cuda/std/__iterator/reverse_iterator.h index e88b183cf3..6cb6960960 100644 --- a/libcudacxx/include/cuda/std/__iterator/reverse_iterator.h +++ b/libcudacxx/include/cuda/std/__iterator/reverse_iterator.h @@ -61,7 +61,7 @@ _LIBCUDACXX_INLINE_VAR constexpr bool __noexcept_rev_iter_iter_move = false; template _LIBCUDACXX_INLINE_VAR constexpr bool __noexcept_rev_iter_iter_move<_Iter, void_t())>> = - is_nothrow_copy_constructible_v<_Iter>&& noexcept(_CUDA_VRANGES::iter_move(--_CUDA_VSTD::declval<_Iter&>())); + is_nothrow_copy_constructible_v<_Iter> && noexcept(_CUDA_VRANGES::iter_move(--_CUDA_VSTD::declval<_Iter&>())); template _LIBCUDACXX_INLINE_VAR constexpr bool __noexcept_rev_iter_iter_swap = false; @@ -69,9 +69,8 @@ _LIBCUDACXX_INLINE_VAR constexpr bool __noexcept_rev_iter_iter_swap = false; template _LIBCUDACXX_INLINE_VAR constexpr bool __noexcept_rev_iter_iter_swap<_Iter, _Iter2, enable_if_t>> = - is_nothrow_copy_constructible_v<_Iter> - && is_nothrow_copy_constructible_v<_Iter2>&& noexcept( - _CUDA_VRANGES::iter_swap(--declval<_Iter&>(), --declval<_Iter2&>())); + is_nothrow_copy_constructible_v<_Iter> && is_nothrow_copy_constructible_v<_Iter2> + && noexcept(_CUDA_VRANGES::iter_swap(--declval<_Iter&>(), --declval<_Iter2&>())); #endif // _CCCL_STD_VER >= 2017 _CCCL_SUPPRESS_DEPRECATED_PUSH @@ -301,9 +300,7 @@ inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_C operator==(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y) #if _CCCL_STD_VER > 2017 requires requires { - { - __x.base() == __y.base() - } -> convertible_to; + { __x.base() == __y.base() } -> convertible_to; } #endif // _CCCL_STD_VER > 2017 { @@ -315,9 +312,7 @@ inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_C operator<(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y) #if _CCCL_STD_VER > 2017 requires requires { - { - __x.base() > __y.base() - } -> convertible_to; + { __x.base() > __y.base() } -> convertible_to; } #endif // _CCCL_STD_VER > 2017 { @@ -329,9 +324,7 @@ inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_C operator!=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y) #if _CCCL_STD_VER > 2017 requires requires { - { - __x.base() != __y.base() - } -> convertible_to; + { __x.base() != __y.base() } -> convertible_to; } #endif // _CCCL_STD_VER > 2017 { @@ -343,9 +336,7 @@ inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_C operator>(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y) #if _CCCL_STD_VER > 2017 requires requires { - { - __x.base() < __y.base() - } -> convertible_to; + { __x.base() < __y.base() } -> convertible_to; } #endif // _CCCL_STD_VER > 2017 { @@ -357,9 +348,7 @@ inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_C operator>=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y) #if _CCCL_STD_VER > 2017 requires requires { - { - __x.base() <= __y.base() - } -> convertible_to; + { __x.base() <= __y.base() } -> convertible_to; } #endif // _CCCL_STD_VER > 2017 { @@ -371,9 +360,7 @@ inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_C operator<=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y) #if _CCCL_STD_VER > 2017 requires requires { - { - __x.base() >= __y.base() - } -> convertible_to; + { __x.base() >= __y.base() } -> convertible_to; } #endif // _CCCL_STD_VER > 2017 { @@ -463,8 +450,8 @@ class __unconstrained_reverse_iterator _LIBCUDACXX_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator() = default; _LIBCUDACXX_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator(const __unconstrained_reverse_iterator&) = default; - _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr explicit __unconstrained_reverse_iterator( - _Iter __iter) + _LIBCUDACXX_HIDE_FROM_ABI + _LIBCUDACXX_INLINE_VISIBILITY constexpr explicit __unconstrained_reverse_iterator(_Iter __iter) : __iter_(__iter) {} @@ -492,7 +479,7 @@ class __unconstrained_reverse_iterator _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY friend constexpr iter_rvalue_reference_t<_Iter> iter_move(const __unconstrained_reverse_iterator& __i) noexcept( - is_nothrow_copy_constructible_v<_Iter>&& noexcept(_CUDA_VRANGES::iter_move(--declval<_Iter&>()))) + is_nothrow_copy_constructible_v<_Iter> && noexcept(_CUDA_VRANGES::iter_move(--declval<_Iter&>()))) { auto __tmp = __i.base(); return _CUDA_VRANGES::iter_move(--__tmp); @@ -629,9 +616,10 @@ struct __unwrap_reverse_iter_impl #ifdef _LIBCUDACXX_HAS_RANGES # if _CCCL_STD_VER > 2014 template <_CUDA_VRANGES::bidirectional_range _Range> -_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr _CUDA_VRANGES:: - subrange>, reverse_iterator<_CUDA_VRANGES::iterator_t<_Range>>> - __reverse_range(_Range&& __range) +_LIBCUDACXX_HIDE_FROM_ABI +_LIBCUDACXX_INLINE_VISIBILITY constexpr _CUDA_VRANGES::subrange>, + reverse_iterator<_CUDA_VRANGES::iterator_t<_Range>>> +__reverse_range(_Range&& __range) { auto __first = _CUDA_VRANGES::begin(__range); return {_CUDA_VSTD::make_reverse_iterator(_CUDA_VRANGES::next(__first, _CUDA_VRANGES::end(__range))), diff --git a/libcudacxx/include/cuda/std/__iterator/size.h b/libcudacxx/include/cuda/std/__iterator/size.h index 46e371de9d..a728570fcd 100644 --- a/libcudacxx/include/cuda/std/__iterator/size.h +++ b/libcudacxx/include/cuda/std/__iterator/size.h @@ -29,8 +29,8 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD #if _CCCL_STD_VER > 2011 template -_LIBCUDACXX_INLINE_VISIBILITY constexpr auto size(const _Cont& __c) noexcept(noexcept(__c.size())) - -> decltype(__c.size()) +_LIBCUDACXX_INLINE_VISIBILITY constexpr auto +size(const _Cont& __c) noexcept(noexcept(__c.size())) -> decltype(__c.size()) { return __c.size(); } diff --git a/libcudacxx/include/cuda/std/__mdspan/extents.h b/libcudacxx/include/cuda/std/__mdspan/extents.h index e798b8c1e1..58ab181afc 100644 --- a/libcudacxx/include/cuda/std/__mdspan/extents.h +++ b/libcudacxx/include/cuda/std/__mdspan/extents.h @@ -270,9 +270,9 @@ class extents __storage_t { # endif - __other.__storage().__enable_psa_conversion() + __other.__storage().__enable_psa_conversion() # ifndef _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS - } + } # else } }) @@ -314,12 +314,12 @@ class extents typename __base_t::__stored_type { # endif - _CUDA_VSTD::conditional_t(), - static_cast(__exts)... + _CUDA_VSTD::conditional_t(), + static_cast(__exts)... # ifndef _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS - } + } # else } }) @@ -363,12 +363,12 @@ class extents typename __base_t::__stored_type { # endif - _CUDA_VSTD::conditional_t<_Np == rank_dynamic(), - __detail::__construct_psa_from_dynamic_exts_array_tag_t<0>, - __detail::__construct_psa_from_all_exts_array_tag_t>(), - _CUDA_VSTD::array<_IndexType, _Np>{__exts} + _CUDA_VSTD::conditional_t<_Np == rank_dynamic(), + __detail::__construct_psa_from_dynamic_exts_array_tag_t<0>, + __detail::__construct_psa_from_all_exts_array_tag_t>(), + _CUDA_VSTD::array<_IndexType, _Np>{__exts} # ifndef _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS - } + } # else } }) @@ -412,12 +412,12 @@ class extents typename __base_t::__stored_type { # endif - _CUDA_VSTD::conditional_t<_Np == rank_dynamic(), - __detail::__construct_psa_from_dynamic_exts_array_tag_t<0>, - __detail::__construct_psa_from_all_exts_array_tag_t>(), - __exts + _CUDA_VSTD::conditional_t<_Np == rank_dynamic(), + __detail::__construct_psa_from_dynamic_exts_array_tag_t<0>, + __detail::__construct_psa_from_all_exts_array_tag_t>(), + __exts # ifndef _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS - } + } # else } }) @@ -440,9 +440,9 @@ class extents # else : __base_t(__base_t { # endif - __sto + __sto # ifndef _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS - } + } # else }) # endif @@ -554,7 +554,7 @@ _CCCL_HOST_DEVICE extents(_IndexTypes...) // Workaround for nvcc //-> extents()...>; // Adding "(void)" so that clang doesn't complain this is unused - ->extents; + -> extents; # endif namespace __detail diff --git a/libcudacxx/include/cuda/std/__mdspan/layout_stride.h b/libcudacxx/include/cuda/std/__mdspan/layout_stride.h index 895b511f94..1818adff8a 100644 --- a/libcudacxx/include/cuda/std/__mdspan/layout_stride.h +++ b/libcudacxx/include/cuda/std/__mdspan/layout_stride.h @@ -100,15 +100,9 @@ constexpr bool __is_mapping_of = template concept __layout_mapping_alike = requires { requires __is_extents::value; - { - _Mp::is_always_strided() - } -> same_as; - { - _Mp::is_always_exhaustive() - } -> same_as; - { - _Mp::is_always_unique() - } -> same_as; + { _Mp::is_always_strided() } -> same_as; + { _Mp::is_always_exhaustive() } -> same_as; + { _Mp::is_always_unique() } -> same_as; bool_constant<_Mp::is_always_strided()>::value; bool_constant<_Mp::is_always_exhaustive()>::value; bool_constant<_Mp::is_always_unique()>::value; @@ -320,11 +314,11 @@ struct layout_stride # else : __base_t(__base_t{__member_pair_t( # endif - __e, __strides_storage_t(__impl::fill_strides(__s)) + __e, __strides_storage_t(__impl::fill_strides(__s)) # ifndef _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS - } + } # else - )}) + )}) # endif { /* @@ -353,11 +347,11 @@ struct layout_stride # else : __base_t(__base_t{__member_pair_t( # endif - __e, __strides_storage_t(__impl::fill_strides(__s)) + __e, __strides_storage_t(__impl::fill_strides(__s)) # ifndef _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS - } + } # else - )}) + )}) # endif { /* @@ -395,11 +389,11 @@ struct layout_stride # else : __base_t(__base_t{__member_pair_t( # endif - __other.extents(), __strides_storage_t(__impl::fill_strides(__other)) + __other.extents(), __strides_storage_t(__impl::fill_strides(__other)) # ifndef _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS - } + } # else - )}) + )}) # endif { /* diff --git a/libcudacxx/include/cuda/std/__mdspan/macros.h b/libcudacxx/include/cuda/std/__mdspan/macros.h index e6f590f874..0eba30a718 100644 --- a/libcudacxx/include/cuda/std/__mdspan/macros.h +++ b/libcudacxx/include/cuda/std/__mdspan/macros.h @@ -425,11 +425,11 @@ return __MDSPAN_PP_REMOVE_PARENS(BODY); \ } # else -# define __MDSPAN_DEDUCE_RETURN_TYPE_SINGLE_LINE(SIGNATURE, BODY) \ - auto __MDSPAN_PP_REMOVE_PARENS(SIGNATURE) \ - -> _CUDA_VSTD::remove_cv_t<_CUDA_VSTD::remove_reference_t> \ - { \ - return __MDSPAN_PP_REMOVE_PARENS(BODY); \ +# define __MDSPAN_DEDUCE_RETURN_TYPE_SINGLE_LINE(SIGNATURE, BODY) \ + auto __MDSPAN_PP_REMOVE_PARENS( \ + SIGNATURE) -> _CUDA_VSTD::remove_cv_t<_CUDA_VSTD::remove_reference_t> \ + { \ + return __MDSPAN_PP_REMOVE_PARENS(BODY); \ } # define __MDSPAN_DEDUCE_DECLTYPE_AUTO_RETURN_TYPE_SINGLE_LINE(SIGNATURE, BODY) \ auto __MDSPAN_PP_REMOVE_PARENS(SIGNATURE) -> decltype(BODY) \ diff --git a/libcudacxx/include/cuda/std/__mdspan/mdspan.h b/libcudacxx/include/cuda/std/__mdspan/mdspan.h index ff3a6ef6e6..1103663025 100644 --- a/libcudacxx/include/cuda/std/__mdspan/mdspan.h +++ b/libcudacxx/include/cuda/std/__mdspan/mdspan.h @@ -188,9 +188,9 @@ class mdspan explicit constexpr mdspan(data_handle_type __p, _SizeTypes... __dynamic_extents) // TODO @proposal-bug shouldn't I be allowed to do `move(__p)` here? : __members( - _CUDA_VSTD::move(__p), - __map_acc_pair_t(mapping_type(extents_type(static_cast(_CUDA_VSTD::move(__dynamic_extents))...)), - accessor_type())) + _CUDA_VSTD::move(__p), + __map_acc_pair_t(mapping_type(extents_type(static_cast(_CUDA_VSTD::move(__dynamic_extents))...)), + accessor_type())) {} __MDSPAN_TEMPLATE_REQUIRES( @@ -221,9 +221,8 @@ class mdspan __MDSPAN_CONDITIONAL_EXPLICIT(_Np != rank_dynamic()) __MDSPAN_INLINE_FUNCTION constexpr mdspan(data_handle_type __p, _CUDA_VSTD::span<_SizeType, _Np> __dynamic_extents) - : __members( - _CUDA_VSTD::move(__p), - __map_acc_pair_t(mapping_type(extents_type(_CUDA_VSTD::as_const(__dynamic_extents))), accessor_type())) + : __members(_CUDA_VSTD::move(__p), + __map_acc_pair_t(mapping_type(extents_type(_CUDA_VSTD::as_const(__dynamic_extents))), accessor_type())) {} __MDSPAN_FUNCTION_REQUIRES( @@ -475,23 +474,22 @@ __MDSPAN_TEMPLATE_REQUIRES( class _ElementType, class... _SizeTypes, /* requires */ __MDSPAN_FOLD_AND(_CCCL_TRAIT(is_integral, _SizeTypes) /* && ... */) && (sizeof...(_SizeTypes) > 0)) -_CCCL_HOST_DEVICE explicit mdspan(_ElementType*, _SizeTypes...) - -> mdspan<_ElementType, dextents>; +_CCCL_HOST_DEVICE explicit mdspan(_ElementType*, + _SizeTypes...) -> mdspan<_ElementType, dextents>; __MDSPAN_TEMPLATE_REQUIRES(class _Pointer, (_CCCL_TRAIT(is_pointer, _CUDA_VSTD::remove_reference_t<_Pointer>))) -_CCCL_HOST_DEVICE mdspan(_Pointer&&) - -> mdspan<_CUDA_VSTD::remove_pointer_t<_CUDA_VSTD::remove_reference_t<_Pointer>>, extents>; +_CCCL_HOST_DEVICE +mdspan(_Pointer&&) -> mdspan<_CUDA_VSTD::remove_pointer_t<_CUDA_VSTD::remove_reference_t<_Pointer>>, extents>; __MDSPAN_TEMPLATE_REQUIRES(class _CArray, (_CCCL_TRAIT(is_array, _CArray) && (rank_v<_CArray> == 1))) _CCCL_HOST_DEVICE mdspan(_CArray&) -> mdspan<_CUDA_VSTD::remove_all_extents_t<_CArray>, extents>>; template -_CCCL_HOST_DEVICE mdspan(_ElementType*, const _CUDA_VSTD::array<_SizeType, _Np>&) - -> mdspan<_ElementType, dextents>; +_CCCL_HOST_DEVICE mdspan(_ElementType*, + const _CUDA_VSTD::array<_SizeType, _Np>&) -> mdspan<_ElementType, dextents>; template -_CCCL_HOST_DEVICE mdspan(_ElementType*, _CUDA_VSTD::span<_SizeType, _Np>) - -> mdspan<_ElementType, dextents>; +_CCCL_HOST_DEVICE mdspan(_ElementType*, _CUDA_VSTD::span<_SizeType, _Np>) -> mdspan<_ElementType, dextents>; // This one is necessary because all the constructors take `data_handle_type`s, not // `_ElementType*`s, and `data_handle_type` is taken from `accessor_type::data_handle_type`, which diff --git a/libcudacxx/include/cuda/std/__mdspan/standard_layout_static_array.h b/libcudacxx/include/cuda/std/__mdspan/standard_layout_static_array.h index f222148d88..fc4c355d7d 100644 --- a/libcudacxx/include/cuda/std/__mdspan/standard_layout_static_array.h +++ b/libcudacxx/include/cuda/std/__mdspan/standard_layout_static_array.h @@ -202,11 +202,11 @@ struct __standard_layout_psa<_Tag, # else : __base_t(__base_t{__next_t( # endif - __construct_psa_from_all_exts_values_tag, __vals... + __construct_psa_from_all_exts_values_tag, __vals... # ifndef _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS - } + } # else - )}) + )}) # endif {} @@ -218,11 +218,11 @@ struct __standard_layout_psa<_Tag, # else : __base_t(__base_t{__next_t( # endif - __construct_psa_from_dynamic_exts_values_tag, __vals... + __construct_psa_from_dynamic_exts_values_tag, __vals... # ifndef _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS - } + } # else - )}) + )}) # endif {} @@ -233,11 +233,11 @@ struct __standard_layout_psa<_Tag, # else : __base_t(__base_t{__next_t( # endif - __vals + __vals # ifndef _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS - } + } # else - )}) + )}) # endif {} @@ -249,11 +249,11 @@ struct __standard_layout_psa<_Tag, # else : __base_t(__base_t{__next_t( # endif - __tag, __vals + __tag, __vals # ifndef _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS - } + } # else - )}) + )}) # endif {} @@ -265,11 +265,11 @@ struct __standard_layout_psa<_Tag, # else : __base_t(__base_t{__next_t( # endif - __tag, __vals + __tag, __vals # ifndef _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS - } + } # else - )}) + )}) # endif {} @@ -280,11 +280,11 @@ struct __standard_layout_psa<_Tag, # else : __base_t(__base_t{__next_t( # endif - __vals + __vals # ifndef _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS - } + } # else - )}) + )}) # endif {} @@ -296,11 +296,11 @@ struct __standard_layout_psa<_Tag, # else : __base_t(__base_t{__next_t( # endif - __tag, __vals + __tag, __vals # ifndef _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS - } + } # else - )}) + )}) # endif {} @@ -313,11 +313,11 @@ struct __standard_layout_psa<_Tag, # else : __base_t(__base_t{__next_t( # endif - __tag, __vals + __tag, __vals # ifndef _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS - } + } # else - )}) + )}) # endif {} @@ -329,11 +329,11 @@ struct __standard_layout_psa<_Tag, # else : __base_t(__base_t{__next_t( # endif - __rhs.__next() + __rhs.__next() # ifndef _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS - } + } # else - )}) + )}) # endif {} diff --git a/libcudacxx/include/cuda/std/__mdspan/static_array.h b/libcudacxx/include/cuda/std/__mdspan/static_array.h index c99dc4964c..de511fe2e6 100644 --- a/libcudacxx/include/cuda/std/__mdspan/static_array.h +++ b/libcudacxx/include/cuda/std/__mdspan/static_array.h @@ -249,13 +249,13 @@ struct __partially_static_array_impl_maker<_Tp, using __dynamic_idxs = typename __mask_sequence<_CUDA_VSTD::integer_sequence, _CUDA_VSTD::integer_sequence>::type; using __impl_base = __partially_static_array_impl< - _Tp, - _static_t, - _CUDA_VSTD::integer_sequence<_static_t, _Vals...>, - __sentinal, - _CUDA_VSTD::integer_sequence, - __dynamic_idxs, - _CUDA_VSTD::make_index_sequence<__dynamic_idxs::size()>>; + _Tp, + _static_t, + _CUDA_VSTD::integer_sequence<_static_t, _Vals...>, + __sentinal, + _CUDA_VSTD::integer_sequence, + __dynamic_idxs, + _CUDA_VSTD::make_index_sequence<__dynamic_idxs::size()>>; }; template diff --git a/libcudacxx/include/cuda/std/__mdspan/submdspan.h b/libcudacxx/include/cuda/std/__mdspan/submdspan.h index 1cf170662c..a91d35ecf4 100644 --- a/libcudacxx/include/cuda/std/__mdspan/submdspan.h +++ b/libcudacxx/include/cuda/std/__mdspan/submdspan.h @@ -157,7 +157,7 @@ struct preserve_layout_right_analysis : integral_constant { using layout_type_if_preserved = layout_right; using encounter_pair = preserve_layout_right_analysis< - // if we encounter a pair, the layout remains a layout right only if it was one before + // if we encounter a pair, the layout remains a layout right only if it was one before // and that only scalars were encountered until now _Result && _EncounteredOnlyScalar, // if we encounter a pair, we didn't encounter scalars only @@ -182,7 +182,7 @@ struct preserve_layout_left_analysis : integral_constant { using layout_type_if_preserved = layout_left; using encounter_pair = preserve_layout_left_analysis< - // if we encounter a pair, the layout remains a layout left only if it was one before + // if we encounter a pair, the layout remains a layout left only if it was one before // and that only all were encountered until now _Result && _EncounteredOnlyAll, // if we encounter a pair, we didn't encounter all only @@ -285,7 +285,8 @@ struct __assign_op_slice_handler< template __MDSPAN_FORCE_INLINE_FUNCTION // NOLINT (misc-unconventional-assign-operator) constexpr auto - operator=(__slice_wrap<_OldStaticExtent, _OldStaticStride, size_t>&& __slice) noexcept -> __assign_op_slice_handler< + operator=(__slice_wrap<_OldStaticExtent, _OldStaticStride, size_t>&& __slice) noexcept + -> __assign_op_slice_handler< _IndexT, typename _PreserveLayoutAnalysis::encounter_scalar, __partially_static_sizes<_IndexT, size_t, _Offsets..., dynamic_extent>, diff --git a/libcudacxx/include/cuda/std/__memory/allocate_at_least.h b/libcudacxx/include/cuda/std/__memory/allocate_at_least.h index 392322fa86..54cd0aa47e 100644 --- a/libcudacxx/include/cuda/std/__memory/allocate_at_least.h +++ b/libcudacxx/include/cuda/std/__memory/allocate_at_least.h @@ -37,8 +37,8 @@ struct allocation_result _LIBCUDACXX_CTAD_SUPPORTED_FOR_TYPE(allocation_result); template -_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr allocation_result< - typename allocator_traits<_Alloc>::pointer> +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI +_LIBCUDACXX_INLINE_VISIBILITY constexpr allocation_result::pointer> allocate_at_least(_Alloc& __alloc, size_t __n) { if constexpr (requires { __alloc.allocate_at_least(__n); }) @@ -66,8 +66,8 @@ struct __allocation_result }; template -_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr __allocation_result< - typename allocator_traits<_Alloc>::pointer> +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI +_LIBCUDACXX_INLINE_VISIBILITY constexpr __allocation_result::pointer> __allocate_at_least(_Alloc& __alloc, size_t __n) { return {__alloc.allocate(__n), __n}; diff --git a/libcudacxx/include/cuda/std/__memory/allocation_guard.h b/libcudacxx/include/cuda/std/__memory/allocation_guard.h index 209d922979..75b9469904 100644 --- a/libcudacxx/include/cuda/std/__memory/allocation_guard.h +++ b/libcudacxx/include/cuda/std/__memory/allocation_guard.h @@ -57,8 +57,8 @@ struct __allocation_guard using _Size = typename allocator_traits<_Alloc>::size_type; template // we perform the allocator conversion inside the constructor - _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 explicit __allocation_guard( - _AllocT __alloc, _Size __n) + _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY + _CCCL_CONSTEXPR_CXX20 explicit __allocation_guard(_AllocT __alloc, _Size __n) : __alloc_(_CUDA_VSTD::move(__alloc)) , __n_(__n) , __ptr_(allocator_traits<_Alloc>::allocate(__alloc_, __n_)) // initialization order is important diff --git a/libcudacxx/include/cuda/std/__memory/allocator_traits.h b/libcudacxx/include/cuda/std/__memory/allocator_traits.h index 628ec0b1eb..57d02d7ead 100644 --- a/libcudacxx/include/cuda/std/__memory/allocator_traits.h +++ b/libcudacxx/include/cuda/std/__memory/allocator_traits.h @@ -291,8 +291,8 @@ __to_raw_pointer(_Pointer __p) noexcept } #else // ^^^ C++17 ^^^ / vvv C++20 vvv template -inline _LIBCUDACXX_INLINE_VISIBILITY auto __to_raw_pointer(const _Pointer& __p) noexcept - -> decltype(pointer_traits<_Pointer>::to_address(__p)) +inline _LIBCUDACXX_INLINE_VISIBILITY auto +__to_raw_pointer(const _Pointer& __p) noexcept -> decltype(pointer_traits<_Pointer>::to_address(__p)) { return pointer_traits<_Pointer>::to_address(__p); } diff --git a/libcudacxx/include/cuda/std/__memory/builtin_new_allocator.h b/libcudacxx/include/cuda/std/__memory/builtin_new_allocator.h index a72b3a6314..65ec8ae9af 100644 --- a/libcudacxx/include/cuda/std/__memory/builtin_new_allocator.h +++ b/libcudacxx/include/cuda/std/__memory/builtin_new_allocator.h @@ -38,8 +38,8 @@ struct __builtin_new_allocator { typedef void* pointer_type; - _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr explicit __builtin_new_deleter( - size_t __size, size_t __align) noexcept + _LIBCUDACXX_HIDE_FROM_ABI + _LIBCUDACXX_INLINE_VISIBILITY constexpr explicit __builtin_new_deleter(size_t __size, size_t __align) noexcept : __size_(__size) , __align_(__align) {} diff --git a/libcudacxx/include/cuda/std/__memory/compressed_pair.h b/libcudacxx/include/cuda/std/__memory/compressed_pair.h index 264ab17a6e..415632c1e4 100644 --- a/libcudacxx/include/cuda/std/__memory/compressed_pair.h +++ b/libcudacxx/include/cuda/std/__memory/compressed_pair.h @@ -152,7 +152,7 @@ class __compressed_pair template , _Dummy>::value - && __dependent_type, _Dummy>::value>> + && __dependent_type, _Dummy>::value>> _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr explicit __compressed_pair() noexcept( _CCCL_TRAIT(is_nothrow_default_constructible, _T1) && _CCCL_TRAIT(is_nothrow_default_constructible, _T2)) : _Base1(__value_init_tag()) diff --git a/libcudacxx/include/cuda/std/__memory/construct_at.h b/libcudacxx/include/cuda/std/__memory/construct_at.h index ea567a887f..f7958ace53 100644 --- a/libcudacxx/include/cuda/std/__memory/construct_at.h +++ b/libcudacxx/include/cuda/std/__memory/construct_at.h @@ -108,9 +108,9 @@ _CCCL_EXEC_CHECK_DISABLE template ()) _Tp(_CUDA_VSTD::declval<_Args>()...))> -_LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 - __enable_if_t::value, _Tp*> - construct_at(_Tp* __location, _Args&&... __args) +_LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX20 __enable_if_t::value, _Tp*> +construct_at(_Tp* __location, _Args&&... __args) { _LIBCUDACXX_ASSERT(__location != nullptr, "null pointer given to construct_at"); // Need to go through `std::construct_at` as that is the explicitly blessed function @@ -125,9 +125,9 @@ _CCCL_EXEC_CHECK_DISABLE template ()) _Tp(_CUDA_VSTD::declval<_Args>()...))> -_LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 - __enable_if_t<__detail::__can_optimize_construct_at<_Tp, _Args...>::value, _Tp*> - construct_at(_Tp* __location, _Args&&... __args) +_LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX20 __enable_if_t<__detail::__can_optimize_construct_at<_Tp, _Args...>::value, _Tp*> +construct_at(_Tp* __location, _Args&&... __args) { _LIBCUDACXX_ASSERT(__location != nullptr, "null pointer given to construct_at"); // Need to go through `std::construct_at` as that is the explicitly blessed function @@ -143,9 +143,9 @@ _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 _CCCL_EXEC_CHECK_DISABLE template -_LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 - __enable_if_t::value, _Tp*> - __construct_at(_Tp* __location, _Args&&... __args) +_LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX20 __enable_if_t::value, _Tp*> +__construct_at(_Tp* __location, _Args&&... __args) { _LIBCUDACXX_ASSERT(__location != nullptr, "null pointer given to construct_at"); #if _CCCL_STD_VER >= 2020 @@ -160,9 +160,9 @@ _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 _CCCL_EXEC_CHECK_DISABLE template -_LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 - __enable_if_t<__detail::__can_optimize_construct_at<_Tp, _Args...>::value, _Tp*> - __construct_at(_Tp* __location, _Args&&... __args) +_LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX20 __enable_if_t<__detail::__can_optimize_construct_at<_Tp, _Args...>::value, _Tp*> +__construct_at(_Tp* __location, _Args&&... __args) { _LIBCUDACXX_ASSERT(__location != nullptr, "null pointer given to construct_at"); #if _CCCL_STD_VER >= 2020 diff --git a/libcudacxx/include/cuda/std/__memory/pointer_traits.h b/libcudacxx/include/cuda/std/__memory/pointer_traits.h index 7216aaf202..e806e47fbb 100644 --- a/libcudacxx/include/cuda/std/__memory/pointer_traits.h +++ b/libcudacxx/include/cuda/std/__memory/pointer_traits.h @@ -349,8 +349,8 @@ inline _LIBCUDACXX_INLINE_VISIBILITY constexpr auto to_address(_Tp* __p) noexcep } template -inline _LIBCUDACXX_INLINE_VISIBILITY constexpr auto to_address(const _Pointer& __p) noexcept - -> decltype(_CUDA_VSTD::__to_address(__p)) +inline _LIBCUDACXX_INLINE_VISIBILITY constexpr auto +to_address(const _Pointer& __p) noexcept -> decltype(_CUDA_VSTD::__to_address(__p)) { return _CUDA_VSTD::__to_address(__p); } diff --git a/libcudacxx/include/cuda/std/__memory/uninitialized_algorithms.h b/libcudacxx/include/cuda/std/__memory/uninitialized_algorithms.h index cb0cc4b0ca..99eb2b725d 100644 --- a/libcudacxx/include/cuda/std/__memory/uninitialized_algorithms.h +++ b/libcudacxx/include/cuda/std/__memory/uninitialized_algorithms.h @@ -658,8 +658,8 @@ template ::value_type, class = __enable_if_t<_CCCL_TRAIT(is_trivially_move_constructible, _Type) - && _CCCL_TRAIT(is_trivially_move_assignable, _Type) - && __allocator_has_trivial_move_construct<_Alloc, _Type>::value>> + && _CCCL_TRAIT(is_trivially_move_assignable, _Type) + && __allocator_has_trivial_move_construct<_Alloc, _Type>::value>> inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 _Iter2 __uninitialized_allocator_move_if_noexcept(_Alloc&, _Iter1 __first1, _Iter1 __last1, _Iter2 __first2) { diff --git a/libcudacxx/include/cuda/std/__memory/unique_ptr.h b/libcudacxx/include/cuda/std/__memory/unique_ptr.h index dfb8fcfc3f..34290623e7 100644 --- a/libcudacxx/include/cuda/std/__memory/unique_ptr.h +++ b/libcudacxx/include/cuda/std/__memory/unique_ptr.h @@ -86,9 +86,9 @@ struct _LIBCUDACXX_TEMPLATE_VIS default_delete<_Tp[]> {} template - _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 - __enable_if_t<_CCCL_TRAIT(is_convertible, _Up (*)[], _Tp (*)[]), void> - operator()(_Up* __ptr) const noexcept + _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY + _CCCL_CONSTEXPR_CXX20 __enable_if_t<_CCCL_TRAIT(is_convertible, _Up (*)[], _Tp (*)[]), void> + operator()(_Up* __ptr) const noexcept { static_assert(sizeof(_Up) >= 0, "cannot delete an incomplete type"); delete[] __ptr; @@ -190,7 +190,8 @@ class _LIBCUDACXX_UNIQUE_PTR_TRIVIAL_ABI _LIBCUDACXX_TEMPLATE_VIS unique_ptr {} template > - _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 explicit unique_ptr(pointer __p) noexcept + _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY + _CCCL_CONSTEXPR_CXX20 explicit unique_ptr(pointer __p) noexcept : __ptr_(__p, __value_init_tag()) {} @@ -535,9 +536,9 @@ class _LIBCUDACXX_UNIQUE_PTR_TRIVIAL_ABI _LIBCUDACXX_TEMPLATE_VIS unique_ptr<_Tp }; template -inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 - __enable_if_t<__is_swappable<_Dp>::value, void> - swap(unique_ptr<_Tp, _Dp>& __x, unique_ptr<_Tp, _Dp>& __y) noexcept +inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX20 __enable_if_t<__is_swappable<_Dp>::value, void> +swap(unique_ptr<_Tp, _Dp>& __x, unique_ptr<_Tp, _Dp>& __y) noexcept { __x.swap(__y); } @@ -551,7 +552,8 @@ operator==(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) #if _CCCL_STD_VER <= 2017 template -inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +inline + _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY bool operator!=(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) @@ -561,7 +563,8 @@ inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY #endif template -inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +inline + _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY bool operator<(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) @@ -573,7 +576,8 @@ inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY } template -inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +inline + _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY bool operator>(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) @@ -582,7 +586,8 @@ inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY } template -inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +inline + _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY bool operator<=(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) @@ -591,7 +596,8 @@ inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY } template -inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +inline + _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY bool operator>=(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) @@ -604,8 +610,8 @@ inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY template requires three_way_comparable_with::pointer, typename unique_ptr<_T2, _D2>::pointer> _LIBCUDACXX_HIDE_FROM_ABI - compare_three_way_result_t::pointer, typename unique_ptr<_T2, _D2>::pointer> - operator<=>(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) +compare_three_way_result_t::pointer, typename unique_ptr<_T2, _D2>::pointer> +operator<=>(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) { return compare_three_way()(__x.get(), __y.get()); } @@ -621,7 +627,8 @@ operator==(const unique_ptr<_T1, _D1>& __x, nullptr_t) noexcept #if _CCCL_STD_VER <= 2017 template -inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +inline + _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY bool operator==(nullptr_t, const unique_ptr<_T1, _D1>& __x) noexcept @@ -630,7 +637,8 @@ inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY } template -inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +inline + _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY bool operator!=(const unique_ptr<_T1, _D1>& __x, nullptr_t) noexcept @@ -639,7 +647,8 @@ inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY } template -inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +inline + _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY bool operator!=(nullptr_t, const unique_ptr<_T1, _D1>& __x) noexcept @@ -710,9 +719,9 @@ operator>=(nullptr_t, const unique_ptr<_T1, _D1>& __x) # if _CCCL_STD_VER >= 2020 template requires three_way_comparable::pointer> -_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 - compare_three_way_result_t::pointer> - operator<=>(const unique_ptr<_T1, _D1>& __x, nullptr_t) +_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX20 compare_three_way_result_t::pointer> +operator<=>(const unique_ptr<_T1, _D1>& __x, nullptr_t) { return compare_three_way()(__x.get(), static_cast::pointer>(nullptr)); } @@ -739,16 +748,16 @@ struct __unique_if<_Tp[_Np]> template inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 - typename __unique_if<_Tp>::__unique_single - make_unique(_Args&&... __args) +typename __unique_if<_Tp>::__unique_single +make_unique(_Args&&... __args) { return unique_ptr<_Tp>(new _Tp(_CUDA_VSTD::forward<_Args>(__args)...)); } template inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 - typename __unique_if<_Tp>::__unique_array_unknown_bound - make_unique(size_t __n) +typename __unique_if<_Tp>::__unique_array_unknown_bound +make_unique(size_t __n) { typedef __remove_extent_t<_Tp> _Up; return unique_ptr<_Tp>(new _Up[__n]()); diff --git a/libcudacxx/include/cuda/std/__numeric/midpoint.h b/libcudacxx/include/cuda/std/__numeric/midpoint.h index f9422d83b1..30db6b2dbd 100644 --- a/libcudacxx/include/cuda/std/__numeric/midpoint.h +++ b/libcudacxx/include/cuda/std/__numeric/midpoint.h @@ -39,9 +39,9 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template _CCCL_NODISCARD _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - __enable_if_t<_CCCL_TRAIT(is_integral, _Tp) && !_CCCL_TRAIT(is_same, bool, _Tp) && !_CCCL_TRAIT(is_null_pointer, _Tp), - _Tp> - midpoint(_Tp __a, _Tp __b) noexcept +__enable_if_t<_CCCL_TRAIT(is_integral, _Tp) && !_CCCL_TRAIT(is_same, bool, _Tp) && !_CCCL_TRAIT(is_null_pointer, _Tp), + _Tp> +midpoint(_Tp __a, _Tp __b) noexcept { using _Up = __make_unsigned_t<_Tp>; @@ -77,9 +77,9 @@ _CCCL_NODISCARD _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 _Fp __fp_abs } template -_CCCL_NODISCARD _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - __enable_if_t<_CCCL_TRAIT(is_floating_point, _Fp), _Fp> - midpoint(_Fp __a, _Fp __b) noexcept +_CCCL_NODISCARD _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX14 __enable_if_t<_CCCL_TRAIT(is_floating_point, _Fp), _Fp> +midpoint(_Fp __a, _Fp __b) noexcept { _CCCL_CONSTEXPR_CXX14 _Fp __lo = numeric_limits<_Fp>::min() * 2; _CCCL_CONSTEXPR_CXX14 _Fp __hi = numeric_limits<_Fp>::max() / 2; diff --git a/libcudacxx/include/cuda/std/__ranges/access.h b/libcudacxx/include/cuda/std/__ranges/access.h index ce10640f52..c2b065075a 100644 --- a/libcudacxx/include/cuda/std/__ranges/access.h +++ b/libcudacxx/include/cuda/std/__ranges/access.h @@ -49,17 +49,13 @@ void begin(const _Tp&) = delete; # if _CCCL_STD_VER > 2017 template concept __member_begin = __can_borrow<_Tp> && __workaround_52970<_Tp> && requires(_Tp&& __t) { - { - _LIBCUDACXX_AUTO_CAST(__t.begin()) - } -> input_or_output_iterator; + { _LIBCUDACXX_AUTO_CAST(__t.begin()) } -> input_or_output_iterator; }; template concept __unqualified_begin = !__member_begin<_Tp> && __can_borrow<_Tp> && __class_or_enum> && requires(_Tp&& __t) { - { - _LIBCUDACXX_AUTO_CAST(begin(__t)) - } -> input_or_output_iterator; + { _LIBCUDACXX_AUTO_CAST(begin(__t)) } -> input_or_output_iterator; }; # else // ^^^ CXX20 ^^^ / vvv CXX17 vvv template @@ -149,18 +145,14 @@ void end(const _Tp&) = delete; template concept __member_end = __can_borrow<_Tp> && __workaround_52970<_Tp> && requires(_Tp&& __t) { typename iterator_t<_Tp>; - { - _LIBCUDACXX_AUTO_CAST(__t.end()) - } -> sentinel_for>; + { _LIBCUDACXX_AUTO_CAST(__t.end()) } -> sentinel_for>; }; template concept __unqualified_end = !__member_end<_Tp> && __can_borrow<_Tp> && __class_or_enum> && requires(_Tp&& __t) { typename iterator_t<_Tp>; - { - _LIBCUDACXX_AUTO_CAST(end(__t)) - } -> sentinel_for>; + { _LIBCUDACXX_AUTO_CAST(end(__t)) } -> sentinel_for>; }; # else // ^^^ CXX20 ^^^ / vvv CXX17 vvv template diff --git a/libcudacxx/include/cuda/std/__ranges/concepts.h b/libcudacxx/include/cuda/std/__ranges/concepts.h index 6a254ad6be..04769a4e1c 100644 --- a/libcudacxx/include/cuda/std/__ranges/concepts.h +++ b/libcudacxx/include/cuda/std/__ranges/concepts.h @@ -118,9 +118,7 @@ concept random_access_range = bidirectional_range<_Tp> && random_access_iterator template concept contiguous_range = random_access_range<_Tp> && contiguous_iterator> && requires(_Tp& __t) { - { - _CUDA_VRANGES::data(__t) - } -> same_as>>; + { _CUDA_VRANGES::data(__t) } -> same_as>>; }; template diff --git a/libcudacxx/include/cuda/std/__ranges/data.h b/libcudacxx/include/cuda/std/__ranges/data.h index 7944d02858..63a89d6c07 100644 --- a/libcudacxx/include/cuda/std/__ranges/data.h +++ b/libcudacxx/include/cuda/std/__ranges/data.h @@ -46,16 +46,12 @@ _LIBCUDACXX_CONCEPT __ptr_to_object = is_pointer_v<_Tp> && is_object_v= 2020 template concept __member_data = __can_borrow<_Tp> && __workaround_52970<_Tp> && requires(_Tp&& __t) { - { - _LIBCUDACXX_AUTO_CAST(__t.data()) - } -> __ptr_to_object; + { _LIBCUDACXX_AUTO_CAST(__t.data()) } -> __ptr_to_object; }; template concept __ranges_begin_invocable = !__member_data<_Tp> && __can_borrow<_Tp> && requires(_Tp&& __t) { - { - _CUDA_VRANGES::begin(__t) - } -> contiguous_iterator; + { _CUDA_VRANGES::begin(__t) } -> contiguous_iterator; }; # else // ^^^ CXX20 ^^^ / vvv CXX17 vvv template diff --git a/libcudacxx/include/cuda/std/__ranges/empty.h b/libcudacxx/include/cuda/std/__ranges/empty.h index 12d6d44fe9..84a9cc2e27 100644 --- a/libcudacxx/include/cuda/std/__ranges/empty.h +++ b/libcudacxx/include/cuda/std/__ranges/empty.h @@ -43,9 +43,7 @@ concept __can_invoke_size = !__member_empty<_Tp> && requires(_Tp&& __t) { _CUDA_ template concept __can_compare_begin_end = !__member_empty<_Tp> && !__can_invoke_size<_Tp> && requires(_Tp&& __t) { bool(_CUDA_VRANGES::begin(__t) == _CUDA_VRANGES::end(__t)); - { - _CUDA_VRANGES::begin(__t) - } -> forward_iterator; + { _CUDA_VRANGES::begin(__t) } -> forward_iterator; }; # else // ^^^ CXX20 ^^^ / vvv CXX17 vvv template diff --git a/libcudacxx/include/cuda/std/__ranges/rbegin.h b/libcudacxx/include/cuda/std/__ranges/rbegin.h index 53ee757969..9399228a4d 100644 --- a/libcudacxx/include/cuda/std/__ranges/rbegin.h +++ b/libcudacxx/include/cuda/std/__ranges/rbegin.h @@ -46,28 +46,20 @@ void rbegin(const _Tp&) = delete; # if _CCCL_STD_VER >= 2020 template concept __member_rbegin = __can_borrow<_Tp> && __workaround_52970<_Tp> && requires(_Tp&& __t) { - { - _LIBCUDACXX_AUTO_CAST(__t.rbegin()) - } -> input_or_output_iterator; + { _LIBCUDACXX_AUTO_CAST(__t.rbegin()) } -> input_or_output_iterator; }; template concept __unqualified_rbegin = !__member_rbegin<_Tp> && __can_borrow<_Tp> && __class_or_enum> && requires(_Tp&& __t) { - { - _LIBCUDACXX_AUTO_CAST(rbegin(__t)) - } -> input_or_output_iterator; + { _LIBCUDACXX_AUTO_CAST(rbegin(__t)) } -> input_or_output_iterator; }; template concept __can_reverse = __can_borrow<_Tp> && !__member_rbegin<_Tp> && !__unqualified_rbegin<_Tp> && requires(_Tp&& __t) { - { - _CUDA_VRANGES::begin(__t) - } -> same_as; - { - _CUDA_VRANGES::begin(__t) - } -> bidirectional_iterator; + { _CUDA_VRANGES::begin(__t) } -> same_as; + { _CUDA_VRANGES::begin(__t) } -> bidirectional_iterator; }; # else // ^^^ CXX20 ^^^ / vvv CXX17 vvv template diff --git a/libcudacxx/include/cuda/std/__ranges/rend.h b/libcudacxx/include/cuda/std/__ranges/rend.h index 4c2a16a725..4a0e490e73 100644 --- a/libcudacxx/include/cuda/std/__ranges/rend.h +++ b/libcudacxx/include/cuda/std/__ranges/rend.h @@ -48,28 +48,20 @@ void rend(const _Tp&) = delete; template concept __member_rend = __can_borrow<_Tp> && __workaround_52970<_Tp> && requires(_Tp&& __t) { _CUDA_VRANGES::rbegin(__t); - { - _LIBCUDACXX_AUTO_CAST(__t.rend()) - } -> sentinel_for; + { _LIBCUDACXX_AUTO_CAST(__t.rend()) } -> sentinel_for; }; template concept __unqualified_rend = !__member_rend<_Tp> && __can_borrow<_Tp> && __class_or_enum> && requires(_Tp&& __t) { _CUDA_VRANGES::rbegin(__t); - { - _LIBCUDACXX_AUTO_CAST(rend(__t)) - } -> sentinel_for; + { _LIBCUDACXX_AUTO_CAST(rend(__t)) } -> sentinel_for; }; template concept __can_reverse = __can_borrow<_Tp> && !__member_rend<_Tp> && !__unqualified_rend<_Tp> && requires(_Tp&& __t) { - { - _CUDA_VRANGES::begin(__t) - } -> same_as; - { - _CUDA_VRANGES::begin(__t) - } -> bidirectional_iterator; + { _CUDA_VRANGES::begin(__t) } -> same_as; + { _CUDA_VRANGES::begin(__t) } -> bidirectional_iterator; }; # else // ^^^ CXX20 ^^^ / vvv CXX17 vvv template diff --git a/libcudacxx/include/cuda/std/__ranges/size.h b/libcudacxx/include/cuda/std/__ranges/size.h index ffafd459c9..feaa2b5148 100644 --- a/libcudacxx/include/cuda/std/__ranges/size.h +++ b/libcudacxx/include/cuda/std/__ranges/size.h @@ -56,28 +56,20 @@ _LIBCUDACXX_CONCEPT __size_enabled = !disable_sized_range>; # if _CCCL_STD_VER >= 2020 template concept __member_size = __size_enabled<_Tp> && __workaround_52970<_Tp> && requires(_Tp&& __t) { - { - _LIBCUDACXX_AUTO_CAST(__t.size()) - } -> __integer_like; + { _LIBCUDACXX_AUTO_CAST(__t.size()) } -> __integer_like; }; template concept __unqualified_size = __size_enabled<_Tp> && !__member_size<_Tp> && __class_or_enum> && requires(_Tp&& __t) { - { - _LIBCUDACXX_AUTO_CAST(size(__t)) - } -> __integer_like; + { _LIBCUDACXX_AUTO_CAST(size(__t)) } -> __integer_like; }; template concept __difference = !__member_size<_Tp> && !__unqualified_size<_Tp> && __class_or_enum> && requires(_Tp&& __t) { - { - _CUDA_VRANGES::begin(__t) - } -> forward_iterator; - { - _CUDA_VRANGES::end(__t) - } -> sized_sentinel_for()))>; + { _CUDA_VRANGES::begin(__t) } -> forward_iterator; + { _CUDA_VRANGES::end(__t) } -> sized_sentinel_for()))>; }; # else // ^^^ CXX20 ^^^ / vvv CXX17 vvv template diff --git a/libcudacxx/include/cuda/std/__ranges/subrange.h b/libcudacxx/include/cuda/std/__ranges/subrange.h index 261d66783c..cc6e193c8b 100644 --- a/libcudacxx/include/cuda/std/__ranges/subrange.h +++ b/libcudacxx/include/cuda/std/__ranges/subrange.h @@ -78,12 +78,8 @@ concept __pair_like = !is_reference_v<_Tp> && requires(_Tp __t) { requires derived_from, integral_constant>; typename tuple_element_t<0, remove_const_t<_Tp>>; typename tuple_element_t<1, remove_const_t<_Tp>>; - { - _CUDA_VSTD::get<0>(__t) - } -> convertible_to&>; - { - _CUDA_VSTD::get<1>(__t) - } -> convertible_to&>; + { _CUDA_VSTD::get<0>(__t) } -> convertible_to&>; + { _CUDA_VSTD::get<1>(__t) } -> convertible_to&>; }; template @@ -258,8 +254,8 @@ class _LIBCUDACXX_TEMPLATE_VIS subrange : public view_interface, int> = 0> - _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr subrange() noexcept( - is_nothrow_default_constructible_v<_It>) + _LIBCUDACXX_HIDE_FROM_ABI + _LIBCUDACXX_INLINE_VISIBILITY constexpr subrange() noexcept(is_nothrow_default_constructible_v<_It>) : view_interface>(){}; # endif // _CCCL_STD_VER <= 2017 @@ -301,8 +297,8 @@ class _LIBCUDACXX_TEMPLATE_VIS subrange : public view_interface) - _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr subrange( - _Range&& __range, make_unsigned_t> __n) + _LIBCUDACXX_HIDE_FROM_ABI + _LIBCUDACXX_INLINE_VISIBILITY constexpr subrange(_Range&& __range, make_unsigned_t> __n) : subrange(_CUDA_VRANGES::begin(__range), _CUDA_VRANGES::end(__range), __n) {} @@ -415,8 +411,8 @@ _CCCL_HOST_DEVICE subrange(_Iter, _Sent) -> subrange<_Iter, _Sent>; _LIBCUDACXX_TEMPLATE(class _Iter, class _Sent) _LIBCUDACXX_REQUIRES(input_or_output_iterator<_Iter> _LIBCUDACXX_AND sentinel_for<_Sent, _Iter>) -_CCCL_HOST_DEVICE subrange(_Iter, _Sent, make_unsigned_t>) - -> subrange<_Iter, _Sent, subrange_kind::sized>; +_CCCL_HOST_DEVICE +subrange(_Iter, _Sent, make_unsigned_t>) -> subrange<_Iter, _Sent, subrange_kind::sized>; _LIBCUDACXX_TEMPLATE(class _Range) _LIBCUDACXX_REQUIRES(borrowed_range<_Range>) @@ -445,8 +441,8 @@ template ) || (_Index == 1), int>> # endif // _CCCL_STD_VER <= 2017 -_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr auto get( - const subrange<_Iter, _Sent, _Kind>& __subrange) +_LIBCUDACXX_HIDE_FROM_ABI +_LIBCUDACXX_INLINE_VISIBILITY constexpr auto get(const subrange<_Iter, _Sent, _Kind>& __subrange) { if constexpr (_Index == 0) { diff --git a/libcudacxx/include/cuda/std/__tuple_dir/tuple_size.h b/libcudacxx/include/cuda/std/__tuple_dir/tuple_size.h index 5ecfe68a28..7fbf9b54e9 100644 --- a/libcudacxx/include/cuda/std/__tuple_dir/tuple_size.h +++ b/libcudacxx/include/cuda/std/__tuple_dir/tuple_size.h @@ -38,23 +38,23 @@ using __enable_if_tuple_size_imp = _Tp; template struct _LIBCUDACXX_TEMPLATE_VIS - tuple_size<__enable_if_tuple_size_imp::value>, - integral_constant)>>> +tuple_size<__enable_if_tuple_size_imp::value>, + integral_constant)>>> : public integral_constant::value> {}; template struct _LIBCUDACXX_TEMPLATE_VIS - tuple_size<__enable_if_tuple_size_imp::value>, - integral_constant)>>> +tuple_size<__enable_if_tuple_size_imp::value>, + integral_constant)>>> : public integral_constant::value> {}; template struct _LIBCUDACXX_TEMPLATE_VIS - tuple_size<__enable_if_tuple_size_imp)>>> +tuple_size<__enable_if_tuple_size_imp)>>> : public integral_constant::value> {}; diff --git a/libcudacxx/include/cuda/std/__type_traits/common_reference.h b/libcudacxx/include/cuda/std/__type_traits/common_reference.h index bddf7d028e..14f7213697 100644 --- a/libcudacxx/include/cuda/std/__type_traits/common_reference.h +++ b/libcudacxx/include/cuda/std/__type_traits/common_reference.h @@ -58,12 +58,12 @@ template struct __cond_res_workaround<_Tp, _Up, void_t<__cond_res_if_right<_Tp, _Up>>> { using _RTp = remove_cvref_t<_Tp>; - using type = conditional_t< - is_same_v<_RTp, remove_cvref_t<_Up>> - && (is_scalar_v<_RTp> || is_array_v<_RTp>) &&((is_lvalue_reference_v<_Tp> && is_rvalue_reference_v<_Up>) - || (is_rvalue_reference_v<_Tp> && is_lvalue_reference_v<_Up>) ), - decay_t<__copy_cv_t, remove_reference_t<_Up>>>, - __cond_res_if_right<_Tp, _Up>>; + using type = + conditional_t> && (is_scalar_v<_RTp> || is_array_v<_RTp>) + && ((is_lvalue_reference_v<_Tp> && is_rvalue_reference_v<_Up>) + || (is_rvalue_reference_v<_Tp> && is_lvalue_reference_v<_Up>) ), + decay_t<__copy_cv_t, remove_reference_t<_Up>>>, + __cond_res_if_right<_Tp, _Up>>; }; template diff --git a/libcudacxx/include/cuda/std/__type_traits/is_assignable.h b/libcudacxx/include/cuda/std/__type_traits/is_assignable.h index e64b1e0e64..26835ca640 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_assignable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_assignable.h @@ -47,8 +47,8 @@ _LIBCUDACXX_INLINE_VAR constexpr bool is_assignable_v = _LIBCUDACXX_IS_ASSIGNABL template _LIBCUDACXX_INLINE_VISIBILITY - typename __select_2nd() = _CUDA_VSTD::declval<_Arg>())), true_type>::type - __is_assignable_test(int); +typename __select_2nd() = _CUDA_VSTD::declval<_Arg>())), true_type>::type +__is_assignable_test(int); template _LIBCUDACXX_INLINE_VISIBILITY false_type __is_assignable_test(...); diff --git a/libcudacxx/include/cuda/std/__type_traits/is_literal_type.h b/libcudacxx/include/cuda/std/__type_traits/is_literal_type.h index d15ec96135..593f1134a8 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_literal_type.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_literal_type.h @@ -29,8 +29,8 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD #if defined(_LIBCUDACXX_IS_LITERAL) && !defined(_LIBCUDACXX_USE_IS_LITERAL_FALLBACK) template -struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX17 is_literal_type - : public integral_constant +struct _LIBCUDACXX_TEMPLATE_VIS +_LIBCUDACXX_DEPRECATED_IN_CXX17 is_literal_type : public integral_constant {}; # if _CCCL_STD_VER > 2011 && !defined(_LIBCUDACXX_HAS_NO_VARIABLE_TEMPLATES) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_swappable.h b/libcudacxx/include/cuda/std/__type_traits/is_swappable.h index 82db5916a9..046d71c21f 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_swappable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_swappable.h @@ -106,8 +106,8 @@ inline _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 __swap_result_t<_Tp> template inline _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - __enable_if_t<__detect_adl_swap::__has_no_adl_swap_array<_Tp, _Np>::value && __is_swappable<_Tp>::value> - swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) noexcept(__is_nothrow_swappable<_Tp>::value); +__enable_if_t<__detect_adl_swap::__has_no_adl_swap_array<_Tp, _Np>::value && __is_swappable<_Tp>::value> + swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) noexcept(__is_nothrow_swappable<_Tp>::value); namespace __detail { @@ -136,8 +136,8 @@ struct __swappable_with<_Tp, _Up, false> : false_type template ::value> struct __nothrow_swappable_with { - static const bool value = noexcept(swap(_CUDA_VSTD::declval<_Tp>(), _CUDA_VSTD::declval<_Up>()))&& noexcept( - swap(_CUDA_VSTD::declval<_Up>(), _CUDA_VSTD::declval<_Tp>())); + static const bool value = noexcept(swap(_CUDA_VSTD::declval<_Tp>(), _CUDA_VSTD::declval<_Up>())) + && noexcept(swap(_CUDA_VSTD::declval<_Up>(), _CUDA_VSTD::declval<_Tp>())); }; template diff --git a/libcudacxx/include/cuda/std/__type_traits/result_of.h b/libcudacxx/include/cuda/std/__type_traits/result_of.h index 57fd0fa178..b2f8dfeb7d 100644 --- a/libcudacxx/include/cuda/std/__type_traits/result_of.h +++ b/libcudacxx/include/cuda/std/__type_traits/result_of.h @@ -31,8 +31,8 @@ template class result_of; template -class _LIBCUDACXX_DEPRECATED_IN_CXX17 _LIBCUDACXX_TEMPLATE_VIS result_of<_Fp(_Args...)> - : public __invoke_of<_Fp, _Args...> +class _LIBCUDACXX_DEPRECATED_IN_CXX17 +_LIBCUDACXX_TEMPLATE_VIS result_of<_Fp(_Args...)> : public __invoke_of<_Fp, _Args...> {}; # if _CCCL_STD_VER > 2011 diff --git a/libcudacxx/include/cuda/std/__utility/exception_guard.h b/libcudacxx/include/cuda/std/__utility/exception_guard.h index 7cabc32d77..534c18ec9a 100644 --- a/libcudacxx/include/cuda/std/__utility/exception_guard.h +++ b/libcudacxx/include/cuda/std/__utility/exception_guard.h @@ -110,8 +110,8 @@ template struct __exception_guard_noexceptions { __exception_guard_noexceptions() = delete; - _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 - _LIBCUDACXX_NODEBUG_TYPE explicit __exception_guard_noexceptions(_Rollback) + _LIBCUDACXX_INLINE_VISIBILITY + _CCCL_CONSTEXPR_CXX20 _LIBCUDACXX_NODEBUG_TYPE explicit __exception_guard_noexceptions(_Rollback) {} _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 _LIBCUDACXX_NODEBUG_TYPE __exception_guard_noexceptions( diff --git a/libcudacxx/include/cuda/std/__utility/forward_like.h b/libcudacxx/include/cuda/std/__utility/forward_like.h index cfa772b3d4..f513c63485 100644 --- a/libcudacxx/include/cuda/std/__utility/forward_like.h +++ b/libcudacxx/include/cuda/std/__utility/forward_like.h @@ -40,8 +40,8 @@ template using _ForwardLike = _OverrideRef<_Ap&&, _CopyConst, remove_reference_t<_Bp>>>; template -_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr auto forward_like(_Up&& __ux) noexcept - -> _ForwardLike<_Tp, _Up> +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr auto +forward_like(_Up&& __ux) noexcept -> _ForwardLike<_Tp, _Up> { return static_cast<_ForwardLike<_Tp, _Up>>(__ux); } diff --git a/libcudacxx/include/cuda/std/__utility/pair.h b/libcudacxx/include/cuda/std/__utility/pair.h index 2e12ffb7a3..3dd0552210 100644 --- a/libcudacxx/include/cuda/std/__utility/pair.h +++ b/libcudacxx/include/cuda/std/__utility/pair.h @@ -563,9 +563,9 @@ operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) #ifndef _LIBCUDACXX_HAS_NO_SPACESHIP_OPERATOR template -_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY constexpr common_comparison_category_t< - __synth_three_way_result<_T1>, - __synth_three_way_result<_T2>> +_LIBCUDACXX_HIDE_FROM_ABI +_LIBCUDACXX_INLINE_VISIBILITY constexpr common_comparison_category_t<__synth_three_way_result<_T1>, + __synth_three_way_result<_T2>> operator<=>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { if (auto __c = _CUDA_VSTD::__synth_three_way(__x.first, __y.first); __c != 0) @@ -633,10 +633,10 @@ struct common_type, pair<_U1, _U2>> #endif // _CCCL_STD_VER >= 2023 template -inline _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX20 - __enable_if_t<__is_swappable<_T1>::value && __is_swappable<_T2>::value, void> - swap(pair<_T1, _T2>& __x, - pair<_T1, _T2>& __y) noexcept((__is_nothrow_swappable<_T1>::value && __is_nothrow_swappable<_T2>::value)) +inline _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX20 __enable_if_t<__is_swappable<_T1>::value && __is_swappable<_T2>::value, void> +swap(pair<_T1, _T2>& __x, + pair<_T1, _T2>& __y) noexcept((__is_nothrow_swappable<_T1>::value && __is_nothrow_swappable<_T2>::value)) { __x.swap(__y); } @@ -652,9 +652,9 @@ swap(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) noexcept(noexcept(__x #endif // _CCCL_STD_VER >= 2023 template -inline _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - pair::type, typename __unwrap_ref_decay<_T2>::type> - make_pair(_T1&& __t1, _T2&& __t2) +inline _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX14 pair::type, typename __unwrap_ref_decay<_T2>::type> +make_pair(_T1&& __t1, _T2&& __t2) { return pair::type, typename __unwrap_ref_decay<_T2>::type>( _CUDA_VSTD::forward<_T1>(__t1), _CUDA_VSTD::forward<_T2>(__t2)); diff --git a/libcudacxx/include/cuda/std/__utility/swap.h b/libcudacxx/include/cuda/std/__utility/swap.h index b68d08388b..db0cf7db7a 100644 --- a/libcudacxx/include/cuda/std/__utility/swap.h +++ b/libcudacxx/include/cuda/std/__utility/swap.h @@ -42,8 +42,8 @@ inline _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 __swap_result_t<_Tp> template inline _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - __enable_if_t<__detect_adl_swap::__has_no_adl_swap_array<_Tp, _Np>::value && __is_swappable<_Tp>::value> - swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) noexcept(__is_nothrow_swappable<_Tp>::value) +__enable_if_t<__detect_adl_swap::__has_no_adl_swap_array<_Tp, _Np>::value && __is_swappable<_Tp>::value> +swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) noexcept(__is_nothrow_swappable<_Tp>::value) { for (size_t __i = 0; __i != _Np; ++__i) { diff --git a/libcudacxx/include/cuda/std/atomic b/libcudacxx/include/cuda/std/atomic index 8ae9efb420..d875451a1e 100644 --- a/libcudacxx/include/cuda/std/atomic +++ b/libcudacxx/include/cuda/std/atomic @@ -358,16 +358,16 @@ _LIBCUDACXX_INLINE_VISIBILITY void atomic_notify_all(atomic<_Tp>* __o) noexcept template _LIBCUDACXX_INLINE_VISIBILITY - __enable_if_t<(is_integral<_Tp>::value && !is_same<_Tp, bool>::value) || is_floating_point<_Tp>::value, _Tp> - atomic_fetch_add(volatile atomic<_Tp>* __o, _Tp __op) noexcept +__enable_if_t<(is_integral<_Tp>::value && !is_same<_Tp, bool>::value) || is_floating_point<_Tp>::value, _Tp> +atomic_fetch_add(volatile atomic<_Tp>* __o, _Tp __op) noexcept { return __o->fetch_add(__op); } template _LIBCUDACXX_INLINE_VISIBILITY - __enable_if_t<(is_integral<_Tp>::value && !is_same<_Tp, bool>::value) || is_floating_point<_Tp>::value, _Tp> - atomic_fetch_add(atomic<_Tp>* __o, _Tp __op) noexcept +__enable_if_t<(is_integral<_Tp>::value && !is_same<_Tp, bool>::value) || is_floating_point<_Tp>::value, _Tp> +atomic_fetch_add(atomic<_Tp>* __o, _Tp __op) noexcept { return __o->fetch_add(__op); } @@ -388,16 +388,16 @@ _LIBCUDACXX_INLINE_VISIBILITY _Tp* atomic_fetch_add(atomic<_Tp*>* __o, ptrdiff_t template _LIBCUDACXX_INLINE_VISIBILITY - __enable_if_t<(is_integral<_Tp>::value && !is_same<_Tp, bool>::value) || is_floating_point<_Tp>::value, _Tp> - atomic_fetch_add_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) noexcept +__enable_if_t<(is_integral<_Tp>::value && !is_same<_Tp, bool>::value) || is_floating_point<_Tp>::value, _Tp> +atomic_fetch_add_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) noexcept { return __o->fetch_add(__op, __m); } template _LIBCUDACXX_INLINE_VISIBILITY - __enable_if_t<(is_integral<_Tp>::value && !is_same<_Tp, bool>::value) || is_floating_point<_Tp>::value, _Tp> - atomic_fetch_add_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) noexcept +__enable_if_t<(is_integral<_Tp>::value && !is_same<_Tp, bool>::value) || is_floating_point<_Tp>::value, _Tp> +atomic_fetch_add_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) noexcept { return __o->fetch_add(__op, __m); } @@ -420,16 +420,16 @@ atomic_fetch_add_explicit(atomic<_Tp*>* __o, ptrdiff_t __op, memory_order __m) n template _LIBCUDACXX_INLINE_VISIBILITY - __enable_if_t<(is_integral<_Tp>::value && !is_same<_Tp, bool>::value) || is_floating_point<_Tp>::value, _Tp> - atomic_fetch_sub(volatile atomic<_Tp>* __o, _Tp __op) noexcept +__enable_if_t<(is_integral<_Tp>::value && !is_same<_Tp, bool>::value) || is_floating_point<_Tp>::value, _Tp> +atomic_fetch_sub(volatile atomic<_Tp>* __o, _Tp __op) noexcept { return __o->fetch_sub(__op); } template _LIBCUDACXX_INLINE_VISIBILITY - __enable_if_t<(is_integral<_Tp>::value && !is_same<_Tp, bool>::value) || is_floating_point<_Tp>::value, _Tp> - atomic_fetch_sub(atomic<_Tp>* __o, _Tp __op) noexcept +__enable_if_t<(is_integral<_Tp>::value && !is_same<_Tp, bool>::value) || is_floating_point<_Tp>::value, _Tp> +atomic_fetch_sub(atomic<_Tp>* __o, _Tp __op) noexcept { return __o->fetch_sub(__op); } @@ -450,16 +450,16 @@ _LIBCUDACXX_INLINE_VISIBILITY _Tp* atomic_fetch_sub(atomic<_Tp*>* __o, ptrdiff_t template _LIBCUDACXX_INLINE_VISIBILITY - __enable_if_t<(is_integral<_Tp>::value && !is_same<_Tp, bool>::value) || is_floating_point<_Tp>::value, _Tp> - atomic_fetch_sub_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) noexcept +__enable_if_t<(is_integral<_Tp>::value && !is_same<_Tp, bool>::value) || is_floating_point<_Tp>::value, _Tp> +atomic_fetch_sub_explicit(volatile atomic<_Tp>* __o, _Tp __op, memory_order __m) noexcept { return __o->fetch_sub(__op, __m); } template _LIBCUDACXX_INLINE_VISIBILITY - __enable_if_t<(is_integral<_Tp>::value && !is_same<_Tp, bool>::value) || is_floating_point<_Tp>::value, _Tp> - atomic_fetch_sub_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) noexcept +__enable_if_t<(is_integral<_Tp>::value && !is_same<_Tp, bool>::value) || is_floating_point<_Tp>::value, _Tp> +atomic_fetch_sub_explicit(atomic<_Tp>* __o, _Tp __op, memory_order __m) noexcept { return __o->fetch_sub(__op, __m); } @@ -822,14 +822,8 @@ static_assert(LIBCUDACXX_ATOMIC_INT_LOCK_FREE, "This library assumes atomic typedef atomic atomic_signed_lock_free; typedef atomic atomic_unsigned_lock_free; -#define LIBCUDACXX_ATOMIC_FLAG_INIT \ - { \ - false \ - } -#define LIBCUDACXX_ATOMIC_VAR_INIT(__v) \ - { \ - __v \ - } +#define LIBCUDACXX_ATOMIC_FLAG_INIT {false} +#define LIBCUDACXX_ATOMIC_VAR_INIT(__v) {__v} _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__bit_reference b/libcudacxx/include/cuda/std/detail/libcxx/include/__bit_reference index bd7a0f69d3..9c64111069 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__bit_reference +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__bit_reference @@ -25,7 +25,7 @@ _LIBCUDACXX_PUSH_MACROS #include <__undef_macros> - _LIBCUDACXX_BEGIN_NAMESPACE_STD + _LIBCUDACXX_BEGIN_NAMESPACE_STD template class __bit_iterator; diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__threading_support b/libcudacxx/include/cuda/std/detail/libcxx/include/__threading_support index af4e3228fb..59d7721fb1 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__threading_support +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__threading_support @@ -76,8 +76,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD # define _LIBCUDACXX_POLLING_COUNT 16 -_LIBCUDACXX_INLINE_VISIBILITY inline void __libcpp_thread_yield_processor() -{ +_LIBCUDACXX_INLINE_VISIBILITY inline void __libcpp_thread_yield_processor(){ # if defined(__aarch64__) # define __LIBCUDACXX_ASM_THREAD_YIELD (asm volatile("yield" :::);) # elif defined(__x86_64__) @@ -87,11 +86,9 @@ _LIBCUDACXX_INLINE_VISIBILITY inline void __libcpp_thread_yield_processor() # else # define __LIBCUDACXX_ASM_THREAD_YIELD (;) # endif - NV_IF_TARGET(NV_IS_HOST, __LIBCUDACXX_ASM_THREAD_YIELD) -} + NV_IF_TARGET(NV_IS_HOST, __LIBCUDACXX_ASM_THREAD_YIELD)} -_LIBCUDACXX_THREAD_ABI_VISIBILITY -void __libcpp_thread_yield(); +_LIBCUDACXX_THREAD_ABI_VISIBILITY void __libcpp_thread_yield(); _LIBCUDACXX_THREAD_ABI_VISIBILITY void __libcpp_thread_sleep_for(chrono::nanoseconds __ns); diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__verbose_abort b/libcudacxx/include/cuda/std/detail/libcxx/include/__verbose_abort index cfc433c561..3449b478d0 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__verbose_abort +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__verbose_abort @@ -50,7 +50,7 @@ _LIBCUDACXX_END_NAMESPACE_STD _LIBCUDACXX_BEGIN_NAMESPACE_STD _CCCL_NORETURN _LIBCUDACXX_OVERRIDABLE_FUNC_VIS - _LIBCUDACXX_ATTRIBUTE_FORMAT(__printf__, 1, 2) void __libcpp_verbose_abort(const char* __format, ...); +_LIBCUDACXX_ATTRIBUTE_FORMAT(__printf__, 1, 2) void __libcpp_verbose_abort(const char* __format, ...); _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/bitset b/libcudacxx/include/cuda/std/detail/libcxx/include/bitset index 7859881eff..d61be09703 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/bitset +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/bitset @@ -222,11 +222,11 @@ inline constexpr __bitset<_N_words, _Size>::__bitset(unsigned long long __v) noe #if __SIZEOF_SIZE_T__ == 8 : __first_{__v} #elif __SIZEOF_SIZE_T__ == 4 - : __first_{ - static_cast<__storage_type>(__v), - _Size >= 2 * __bits_per_word - ? static_cast<__storage_type>(__v >> __bits_per_word) - : static_cast<__storage_type>((__v >> __bits_per_word) & (__storage_type(1) << (_Size - __bits_per_word)) - 1)} + : __first_{static_cast<__storage_type>(__v), + _Size >= 2 * __bits_per_word + ? static_cast<__storage_type>(__v >> __bits_per_word) + : static_cast<__storage_type>( + (__v >> __bits_per_word) & (__storage_type(1) << (_Size - __bits_per_word)) - 1)} #else # error This constructor has not been ported to this platform #endif diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/chrono b/libcudacxx/include/cuda/std/detail/libcxx/include/chrono index bc1a60d854..aa47f97bba 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/chrono +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/chrono @@ -1458,7 +1458,7 @@ public: template struct _LIBCUDACXX_TEMPLATE_VIS - common_type, chrono::time_point<_Clock, _Duration2>> +common_type, chrono::time_point<_Clock, _Duration2>> { typedef chrono::time_point<_Clock, typename common_type<_Duration1, _Duration2>::type> type; }; @@ -1563,9 +1563,9 @@ operator>=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, // time_point operator+(time_point x, duration y); template -inline _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2>>::type> - operator+(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Period2>& __rhs) +inline _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX14 time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2>>::type> +operator+(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Period2>& __rhs) { typedef time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2>>::type> _Tr; return _Tr(__lhs.time_since_epoch() + __rhs); @@ -1574,9 +1574,9 @@ inline _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 // time_point operator+(duration x, time_point y); template -inline _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - time_point<_Clock, typename common_type, _Duration2>::type> - operator+(const duration<_Rep1, _Period1>& __lhs, const time_point<_Clock, _Duration2>& __rhs) +inline _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX14 time_point<_Clock, typename common_type, _Duration2>::type> +operator+(const duration<_Rep1, _Period1>& __lhs, const time_point<_Clock, _Duration2>& __rhs) { return __rhs + __lhs; } @@ -1584,9 +1584,9 @@ inline _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 // time_point operator-(time_point x, duration y); template -inline _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2>>::type> - operator-(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Period2>& __rhs) +inline _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX14 time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2>>::type> +operator-(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Period2>& __rhs) { typedef time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2>>::type> _Ret; return _Ret(__lhs.time_since_epoch() - __rhs); diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/cmath b/libcudacxx/include/cuda/std/detail/libcxx/include/cmath index ce50dedae6..3b27d1ca90 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/cmath +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/cmath @@ -602,9 +602,9 @@ inline _LIBCUDACXX_INLINE_VISIBILITY long double hypot(long double x, long doubl template inline _LIBCUDACXX_INLINE_VISIBILITY - __enable_if_t::value && is_arithmetic<_A2>::value && is_arithmetic<_A3>::value, - __promote<_A1, _A2, _A3>> - hypot(_A1 __lcpp_x, _A2 __lcpp_y, _A3 __lcpp_z) noexcept +__enable_if_t::value && is_arithmetic<_A2>::value && is_arithmetic<_A3>::value, + __promote<_A1, _A2, _A3>> +hypot(_A1 __lcpp_x, _A2 __lcpp_y, _A3 __lcpp_z) noexcept { using __result_type = __promote_t<_A1, _A2, _A3>; static_assert( @@ -709,9 +709,9 @@ __constexpr_copysign(long double __x, long double __y) noexcept } template -inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - __enable_if_t::value && is_arithmetic<_A2>::value, __promote_t<_A1, _A2>> - __constexpr_copysign(_A1 __x, _A2 __y) noexcept +inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_INLINE_VISIBILITY +_CCCL_CONSTEXPR_CXX14 __enable_if_t::value && is_arithmetic<_A2>::value, __promote_t<_A1, _A2>> +__constexpr_copysign(_A1 __x, _A2 __y) noexcept { using __result_type = __promote_t<_A1, _A2>; static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), ""); diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/math.h b/libcudacxx/include/cuda/std/detail/libcxx/include/math.h index 2150ddc672..46fead1dc7 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/math.h +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/math.h @@ -335,16 +335,16 @@ signbit(_A1 __lcpp_x) noexcept template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::enable_if::value && std::is_signed<_A1>::value, bool>::type - signbit(_A1 __lcpp_x) noexcept +typename std::enable_if::value && std::is_signed<_A1>::value, bool>::type +signbit(_A1 __lcpp_x) noexcept { return __lcpp_x < 0; } template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::enable_if::value && !std::is_signed<_A1>::value, bool>::type - signbit(_A1) noexcept +typename std::enable_if::value && !std::is_signed<_A1>::value, bool>::type +signbit(_A1) noexcept { return false; } @@ -360,16 +360,16 @@ signbit(_A1 __lcpp_x) noexcept template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::enable_if::value && std::is_signed<_A1>::value, bool>::type - signbit(_A1 __lcpp_x) noexcept +typename std::enable_if::value && std::is_signed<_A1>::value, bool>::type +signbit(_A1 __lcpp_x) noexcept { return __lcpp_x < 0; } template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::enable_if::value && !std::is_signed<_A1>::value, bool>::type - signbit(_A1) noexcept +typename std::enable_if::value && !std::is_signed<_A1>::value, bool>::type +signbit(_A1) noexcept { return false; } @@ -434,16 +434,16 @@ _LIBCUDACXX_INLINE_VISIBILITY bool __libcpp_isfinite(_A1 __lcpp_x) noexcept template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::enable_if::value && std::numeric_limits<_A1>::has_infinity, bool>::type - isfinite(_A1 __lcpp_x) noexcept +typename std::enable_if::value && std::numeric_limits<_A1>::has_infinity, bool>::type +isfinite(_A1 __lcpp_x) noexcept { return __libcpp_isfinite((typename std::__promote<_A1>::type) __lcpp_x); } template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::enable_if::value && !std::numeric_limits<_A1>::has_infinity, bool>::type - isfinite(_A1) noexcept +typename std::enable_if::value && !std::numeric_limits<_A1>::has_infinity, bool>::type +isfinite(_A1) noexcept { return true; } @@ -464,16 +464,16 @@ _LIBCUDACXX_INLINE_VISIBILITY bool __libcpp_isinf(_A1 __lcpp_x) noexcept template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::enable_if::value && std::numeric_limits<_A1>::has_infinity, bool>::type - isinf(_A1 __lcpp_x) noexcept +typename std::enable_if::value && std::numeric_limits<_A1>::has_infinity, bool>::type +isinf(_A1 __lcpp_x) noexcept { return __libcpp_isinf((typename std::__promote<_A1>::type) __lcpp_x); } template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::enable_if::value && !std::numeric_limits<_A1>::has_infinity, bool>::type - isinf(_A1) noexcept +typename std::enable_if::value && !std::numeric_limits<_A1>::has_infinity, bool>::type +isinf(_A1) noexcept { return false; } @@ -584,8 +584,8 @@ _LIBCUDACXX_INLINE_VISIBILITY bool __libcpp_isgreater(_A1 __lcpp_x, _A2 __lcpp_y template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::enable_if::value && std::is_arithmetic<_A2>::value, bool>::type - isgreater(_A1 __lcpp_x, _A2 __lcpp_y) noexcept +typename std::enable_if::value && std::is_arithmetic<_A2>::value, bool>::type +isgreater(_A1 __lcpp_x, _A2 __lcpp_y) noexcept { typedef typename std::__promote<_A1, _A2>::type type; return __libcpp_isgreater((type) __lcpp_x, (type) __lcpp_y); @@ -607,8 +607,8 @@ _LIBCUDACXX_INLINE_VISIBILITY bool __libcpp_isgreaterequal(_A1 __lcpp_x, _A2 __l template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::enable_if::value && std::is_arithmetic<_A2>::value, bool>::type - isgreaterequal(_A1 __lcpp_x, _A2 __lcpp_y) noexcept +typename std::enable_if::value && std::is_arithmetic<_A2>::value, bool>::type +isgreaterequal(_A1 __lcpp_x, _A2 __lcpp_y) noexcept { typedef typename std::__promote<_A1, _A2>::type type; return __libcpp_isgreaterequal((type) __lcpp_x, (type) __lcpp_y); @@ -630,8 +630,8 @@ _LIBCUDACXX_INLINE_VISIBILITY bool __libcpp_isless(_A1 __lcpp_x, _A2 __lcpp_y) n template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::enable_if::value && std::is_arithmetic<_A2>::value, bool>::type - isless(_A1 __lcpp_x, _A2 __lcpp_y) noexcept +typename std::enable_if::value && std::is_arithmetic<_A2>::value, bool>::type +isless(_A1 __lcpp_x, _A2 __lcpp_y) noexcept { typedef typename std::__promote<_A1, _A2>::type type; return __libcpp_isless((type) __lcpp_x, (type) __lcpp_y); @@ -653,8 +653,8 @@ _LIBCUDACXX_INLINE_VISIBILITY bool __libcpp_islessequal(_A1 __lcpp_x, _A2 __lcpp template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::enable_if::value && std::is_arithmetic<_A2>::value, bool>::type - islessequal(_A1 __lcpp_x, _A2 __lcpp_y) noexcept +typename std::enable_if::value && std::is_arithmetic<_A2>::value, bool>::type +islessequal(_A1 __lcpp_x, _A2 __lcpp_y) noexcept { typedef typename std::__promote<_A1, _A2>::type type; return __libcpp_islessequal((type) __lcpp_x, (type) __lcpp_y); @@ -676,8 +676,8 @@ _LIBCUDACXX_INLINE_VISIBILITY bool __libcpp_islessgreater(_A1 __lcpp_x, _A2 __lc template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::enable_if::value && std::is_arithmetic<_A2>::value, bool>::type - islessgreater(_A1 __lcpp_x, _A2 __lcpp_y) noexcept +typename std::enable_if::value && std::is_arithmetic<_A2>::value, bool>::type +islessgreater(_A1 __lcpp_x, _A2 __lcpp_y) noexcept { typedef typename std::__promote<_A1, _A2>::type type; return __libcpp_islessgreater((type) __lcpp_x, (type) __lcpp_y); @@ -699,8 +699,8 @@ _LIBCUDACXX_INLINE_VISIBILITY bool __libcpp_isunordered(_A1 __lcpp_x, _A2 __lcpp template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::enable_if::value && std::is_arithmetic<_A2>::value, bool>::type - isunordered(_A1 __lcpp_x, _A2 __lcpp_y) noexcept +typename std::enable_if::value && std::is_arithmetic<_A2>::value, bool>::type +isunordered(_A1 __lcpp_x, _A2 __lcpp_y) noexcept { typedef typename std::__promote<_A1, _A2>::type type; return __libcpp_isunordered((type) __lcpp_x, (type) __lcpp_y); @@ -844,8 +844,8 @@ inline _LIBCUDACXX_INLINE_VISIBILITY long double atan2(long double __lcpp_y, lon template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type - atan2(_A1 __lcpp_y, _A2 __lcpp_x) noexcept +typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type +atan2(_A1 __lcpp_y, _A2 __lcpp_x) noexcept { typedef typename std::__promote<_A1, _A2>::type __result_type; static_assert((!(std::_IsSame<_A1, __result_type>::value && std::_IsSame<_A2, __result_type>::value)), ""); @@ -987,8 +987,8 @@ inline _LIBCUDACXX_INLINE_VISIBILITY long double fmod(long double __lcpp_x, long template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type - fmod(_A1 __lcpp_x, _A2 __lcpp_y) noexcept +typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type +fmod(_A1 __lcpp_x, _A2 __lcpp_y) noexcept { typedef typename std::__promote<_A1, _A2>::type __result_type; static_assert((!(std::_IsSame<_A1, __result_type>::value && std::_IsSame<_A2, __result_type>::value)), ""); @@ -1103,8 +1103,8 @@ inline _LIBCUDACXX_INLINE_VISIBILITY long double pow(long double __lcpp_x, long template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type - pow(_A1 __lcpp_x, _A2 __lcpp_y) noexcept +typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type +pow(_A1 __lcpp_x, _A2 __lcpp_y) noexcept { typedef typename std::__promote<_A1, _A2>::type __result_type; static_assert((!(std::_IsSame<_A1, __result_type>::value && std::_IsSame<_A2, __result_type>::value)), ""); @@ -1296,8 +1296,8 @@ inline _LIBCUDACXX_INLINE_VISIBILITY long double copysign(long double __lcpp_x, template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type - copysign(_A1 __lcpp_x, _A2 __lcpp_y) noexcept +typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type +copysign(_A1 __lcpp_x, _A2 __lcpp_y) noexcept { typedef typename std::__promote<_A1, _A2>::type __result_type; static_assert((!(std::_IsSame<_A1, __result_type>::value && std::_IsSame<_A2, __result_type>::value)), ""); @@ -1389,8 +1389,8 @@ inline _LIBCUDACXX_INLINE_VISIBILITY long double fdim(long double __lcpp_x, long template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type - fdim(_A1 __lcpp_x, _A2 __lcpp_y) noexcept +typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type +fdim(_A1 __lcpp_x, _A2 __lcpp_y) noexcept { typedef typename std::__promote<_A1, _A2>::type __result_type; static_assert((!(std::_IsSame<_A1, __result_type>::value && std::_IsSame<_A2, __result_type>::value)), ""); @@ -1435,8 +1435,8 @@ inline _LIBCUDACXX_INLINE_VISIBILITY long double fmax(long double __lcpp_x, long template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type - fmax(_A1 __lcpp_x, _A2 __lcpp_y) noexcept +typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type +fmax(_A1 __lcpp_x, _A2 __lcpp_y) noexcept { typedef typename std::__promote<_A1, _A2>::type __result_type; static_assert((!(std::_IsSame<_A1, __result_type>::value && std::_IsSame<_A2, __result_type>::value)), ""); @@ -1456,8 +1456,8 @@ inline _LIBCUDACXX_INLINE_VISIBILITY long double fmin(long double __lcpp_x, long template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type - fmin(_A1 __lcpp_x, _A2 __lcpp_y) noexcept +typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type +fmin(_A1 __lcpp_x, _A2 __lcpp_y) noexcept { typedef typename std::__promote<_A1, _A2>::type __result_type; static_assert((!(std::_IsSame<_A1, __result_type>::value && std::_IsSame<_A2, __result_type>::value)), ""); @@ -1477,8 +1477,8 @@ inline _LIBCUDACXX_INLINE_VISIBILITY long double hypot(long double __lcpp_x, lon template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type - hypot(_A1 __lcpp_x, _A2 __lcpp_y) noexcept +typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type +hypot(_A1 __lcpp_x, _A2 __lcpp_y) noexcept { typedef typename std::__promote<_A1, _A2>::type __result_type; static_assert((!(std::_IsSame<_A1, __result_type>::value && std::_IsSame<_A2, __result_type>::value)), ""); @@ -1680,8 +1680,8 @@ inline _LIBCUDACXX_INLINE_VISIBILITY long double nextafter(long double __lcpp_x, template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type - nextafter(_A1 __lcpp_x, _A2 __lcpp_y) noexcept +typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type +nextafter(_A1 __lcpp_x, _A2 __lcpp_y) noexcept { typedef typename std::__promote<_A1, _A2>::type __result_type; static_assert((!(std::_IsSame<_A1, __result_type>::value && std::_IsSame<_A2, __result_type>::value)), ""); @@ -1719,8 +1719,8 @@ inline _LIBCUDACXX_INLINE_VISIBILITY long double remainder(long double __lcpp_x, template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type - remainder(_A1 __lcpp_x, _A2 __lcpp_y) noexcept +typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type +remainder(_A1 __lcpp_x, _A2 __lcpp_y) noexcept { typedef typename std::__promote<_A1, _A2>::type __result_type; static_assert((!(std::_IsSame<_A1, __result_type>::value && std::_IsSame<_A2, __result_type>::value)), ""); @@ -1741,8 +1741,8 @@ remquo(long double __lcpp_x, long double __lcpp_y, int* __lcpp_z) noexcept template inline _LIBCUDACXX_INLINE_VISIBILITY - typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type - remquo(_A1 __lcpp_x, _A2 __lcpp_y, int* __lcpp_z) noexcept +typename std::_EnableIf::value && std::is_arithmetic<_A2>::value, std::__promote<_A1, _A2>>::type +remquo(_A1 __lcpp_x, _A2 __lcpp_y, int* __lcpp_z) noexcept { typedef typename std::__promote<_A1, _A2>::type __result_type; static_assert((!(std::_IsSame<_A1, __result_type>::value && std::_IsSame<_A2, __result_type>::value)), ""); diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/optional b/libcudacxx/include/cuda/std/detail/libcxx/include/optional index 9ab5cdb5ab..c77ed212da 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/optional +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/optional @@ -761,7 +761,7 @@ private: _LIBCUDACXX_INLINE_VISIBILITY constexpr explicit optional( __optional_construct_from_invoke_tag, _Fp&& __f, _Args&&... __args) : __base( - __optional_construct_from_invoke_tag{}, _CUDA_VSTD::forward<_Fp>(__f), _CUDA_VSTD::forward<_Args>(__args)...) + __optional_construct_from_invoke_tag{}, _CUDA_VSTD::forward<_Fp>(__f), _CUDA_VSTD::forward<_Args>(__args)...) {} public: diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/span b/libcudacxx/include/cuda/std/detail/libcxx/include/span index f049e7cc16..9601eb3d6d 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/span +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/span @@ -816,8 +816,8 @@ _CCCL_HOST_DEVICE span(const _Container&) -> span) -_CCCL_HOST_DEVICE span(_It, _EndOrSize) - -> span>, __maybe_static_ext<_EndOrSize>>; +_CCCL_HOST_DEVICE span(_It, + _EndOrSize) -> span>, __maybe_static_ext<_EndOrSize>>; _LIBCUDACXX_TEMPLATE(class _Range) _LIBCUDACXX_REQUIRES(_CUDA_VRANGES::contiguous_range<_Range>) diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/tuple b/libcudacxx/include/cuda/std/detail/libcxx/include/tuple index 5c878f3654..62802506dd 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/tuple +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/tuple @@ -264,8 +264,8 @@ public: using __can_forward = _And<_IsNotSame<__remove_cvref_t<_Tp>, __tuple_leaf>, is_constructible<_Hp, _Tp>>; template ::value, int> = 0> - _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 explicit __tuple_leaf(_Tp&& __t) noexcept( - _CCCL_TRAIT(is_nothrow_constructible, _Hp, _Tp)) + _LIBCUDACXX_INLINE_VISIBILITY + _CCCL_CONSTEXPR_CXX14 explicit __tuple_leaf(_Tp&& __t) noexcept(_CCCL_TRAIT(is_nothrow_constructible, _Hp, _Tp)) : __value_(_CUDA_VSTD::forward<_Tp>(__t)) { static_assert(__can_bind_reference<_Tp&&>(), @@ -356,8 +356,8 @@ public: using __can_forward = _And<_IsNotSame<__remove_cvref_t<_Tp>, __tuple_leaf>, is_constructible<_Hp, _Tp>>; template ::value, int> = 0> - _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 explicit __tuple_leaf(_Tp&& __t) noexcept( - (is_nothrow_constructible<_Hp, _Tp>::value)) + _LIBCUDACXX_INLINE_VISIBILITY + _CCCL_CONSTEXPR_CXX14 explicit __tuple_leaf(_Tp&& __t) noexcept((is_nothrow_constructible<_Hp, _Tp>::value)) : _Hp(_CUDA_VSTD::forward<_Tp>(__t)) {} @@ -443,11 +443,9 @@ struct _LIBCUDACXX_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>, // Handle non-allocator, partial default initialization // Recursively delegate until we have full rank template = 0> - _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 explicit __tuple_impl( - __tuple_variadic_constructor_tag __tag, - _Up&&... __u) noexcept(noexcept(__tuple_impl(__tag, - _CUDA_VSTD::forward<_Up>(__u)..., - __tuple_leaf_default_constructor_tag{}))) + _LIBCUDACXX_INLINE_VISIBILITY + _CCCL_CONSTEXPR_CXX14 explicit __tuple_impl(__tuple_variadic_constructor_tag __tag, _Up&&... __u) noexcept( + noexcept(__tuple_impl(__tag, _CUDA_VSTD::forward<_Up>(__u)..., __tuple_leaf_default_constructor_tag{}))) : __tuple_impl(__tag, _CUDA_VSTD::forward<_Up>(__u)..., __tuple_leaf_default_constructor_tag{}) {} @@ -709,8 +707,8 @@ public: template , __enable_if_t<_Constraints::__explicit_variadic_copy_constructible, int> = 0> - _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 explicit tuple(const _Tp&... __t) noexcept( - _Constraints::__nothrow_variadic_copy_constructible) + _LIBCUDACXX_INLINE_VISIBILITY + _CCCL_CONSTEXPR_CXX14 explicit tuple(const _Tp&... __t) noexcept(_Constraints::__nothrow_variadic_copy_constructible) : __base_(__tuple_variadic_constructor_tag{}, __t...) {} @@ -754,8 +752,8 @@ public: template , __enable_if_t<_Constraints::__explicit_constructible, int> = 0> - _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 explicit tuple(_Up&&... __u) noexcept( - _Constraints::__nothrow_constructible) + _LIBCUDACXX_INLINE_VISIBILITY + _CCCL_CONSTEXPR_CXX14 explicit tuple(_Up&&... __u) noexcept(_Constraints::__nothrow_constructible) : __base_(__tuple_variadic_constructor_tag{}, _CUDA_VSTD::forward<_Up>(__u)...) {} @@ -822,8 +820,8 @@ public: __enable_if_t::value, int> = 0, __enable_if_t = 0, __enable_if_t<_Constraints::__explicit_constructible, int> = 0> - _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 explicit tuple(_Tuple&& __t) noexcept( - _CCCL_TRAIT(is_nothrow_constructible, _BaseT, _Tuple)) + _LIBCUDACXX_INLINE_VISIBILITY + _CCCL_CONSTEXPR_CXX14 explicit tuple(_Tuple&& __t) noexcept(_CCCL_TRAIT(is_nothrow_constructible, _BaseT, _Tuple)) : __base_(_CUDA_VSTD::forward<_Tuple>(__t)) {} @@ -1234,8 +1232,8 @@ struct __tuple_cat, __tuple_indices<_I0...>, __tuple_indices<_J { template _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - typename __tuple_cat_return_ref&&, _Tuple0&&>::type - operator()(tuple<_Types...> __t, _Tuple0&& __t0) + typename __tuple_cat_return_ref&&, _Tuple0&&>::type + operator()(tuple<_Types...> __t, _Tuple0&& __t0) { (void) __t; return _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::forward<_Types>(_CUDA_VSTD::get<_I0>(__t))..., @@ -1244,8 +1242,8 @@ struct __tuple_cat, __tuple_indices<_I0...>, __tuple_indices<_J template _LIBCUDACXX_INLINE_VISIBILITY _CCCL_CONSTEXPR_CXX14 - typename __tuple_cat_return_ref&&, _Tuple0&&, _Tuple1&&, _Tuples&&...>::type - operator()(tuple<_Types...> __t, _Tuple0&& __t0, _Tuple1&& __t1, _Tuples&&... __tpls) + typename __tuple_cat_return_ref&&, _Tuple0&&, _Tuple1&&, _Tuples&&...>::type + operator()(tuple<_Types...> __t, _Tuple0&& __t0, _Tuple1&& __t1, _Tuples&&... __tpls) { (void) __t; typedef _LIBCUDACXX_NODEBUG_TYPE __libcpp_remove_reference_t<_Tuple0> _T0; diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/variant b/libcudacxx/include/cuda/std/detail/libcxx/include/variant index 0bdfb9fa76..6e22195b91 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/variant +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/variant @@ -1395,8 +1395,8 @@ template struct __overload_bool { template > - _LIBCUDACXX_INLINE_VISIBILITY auto operator()(bool, _Up&&) const - -> enable_if_t<_CCCL_TRAIT(is_same, _Ap, bool), __type_identity<_Tp>>; + _LIBCUDACXX_INLINE_VISIBILITY auto + operator()(bool, _Up&&) const -> enable_if_t<_CCCL_TRAIT(is_same, _Ap, bool), __type_identity<_Tp>>; }; template @@ -1733,9 +1733,8 @@ _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS } template -_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr variant_alternative_t< - _Ip, - variant<_Types...>>& +_LIBCUDACXX_INLINE_VISIBILITY +_LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr variant_alternative_t<_Ip, variant<_Types...>>& get(variant<_Types...>& __v) { static_assert(_Ip < sizeof...(_Types), ""); @@ -1744,9 +1743,8 @@ get(variant<_Types...>& __v) } template -_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr variant_alternative_t< - _Ip, - variant<_Types...>>&& +_LIBCUDACXX_INLINE_VISIBILITY +_LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr variant_alternative_t<_Ip, variant<_Types...>>&& get(variant<_Types...>&& __v) { static_assert(_Ip < sizeof...(_Types), ""); @@ -1755,9 +1753,8 @@ get(variant<_Types...>&& __v) } template -_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr const variant_alternative_t< - _Ip, - variant<_Types...>>& +_LIBCUDACXX_INLINE_VISIBILITY +_LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr const variant_alternative_t<_Ip, variant<_Types...>>& get(const variant<_Types...>& __v) { static_assert(_Ip < sizeof...(_Types), ""); @@ -1766,9 +1763,8 @@ get(const variant<_Types...>& __v) } template -_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr const variant_alternative_t< - _Ip, - variant<_Types...>>&& +_LIBCUDACXX_INLINE_VISIBILITY +_LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr const variant_alternative_t<_Ip, variant<_Types...>>&& get(const variant<_Types...>&& __v) { static_assert(_Ip < sizeof...(_Types), ""); @@ -2095,9 +2091,8 @@ visit(_Visitor&& __visitor, _Vs&&... __vs) } template -_LIBCUDACXX_INLINE_VISIBILITY auto -swap(variant<_Types...>& __lhs, variant<_Types...>& __rhs) noexcept(noexcept(__lhs.swap(__rhs))) - -> decltype(__lhs.swap(__rhs)) +_LIBCUDACXX_INLINE_VISIBILITY auto swap(variant<_Types...>& __lhs, variant<_Types...>& __rhs) noexcept( + noexcept(__lhs.swap(__rhs))) -> decltype(__lhs.swap(__rhs)) { return __lhs.swap(__rhs); } diff --git a/libcudacxx/include/nv/detail/__target_macros b/libcudacxx/include/nv/detail/__target_macros index 4c77f71642..f3baf04906 100644 --- a/libcudacxx/include/nv/detail/__target_macros +++ b/libcudacxx/include/nv/detail/__target_macros @@ -504,18 +504,12 @@ # if defined(_NV_TARGET_CPP11) -# define _NV_BLOCK_EXPAND(...) \ - { \ - _NV_REMOVE_PAREN(__VA_ARGS__) \ - } +# define _NV_BLOCK_EXPAND(...) {_NV_REMOVE_PAREN(__VA_ARGS__)} # define _NV_TARGET_IF(cond, t, ...) _NV_IF(_NV_ARCH_COND_CAT(cond), t, __VA_ARGS__) # else // ) &&_CUDA_VSTD::_One_of) // + _LIBCUDACXX_REQUIRES((!cuda::property_with_value) && _CUDA_VSTD::_One_of) // friend void get_property(const async_resource&, Property) noexcept {} _LIBCUDACXX_TEMPLATE(class Property) diff --git a/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.async_resource_ref/async_resource_ref.conversion.pass.cpp b/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.async_resource_ref/async_resource_ref.conversion.pass.cpp index 852ccd34f8..3a2cc16a0d 100644 --- a/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.async_resource_ref/async_resource_ref.conversion.pass.cpp +++ b/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.async_resource_ref/async_resource_ref.conversion.pass.cpp @@ -71,7 +71,7 @@ struct resource int _val = 0; _LIBCUDACXX_TEMPLATE(class Property) - _LIBCUDACXX_REQUIRES((!cuda::property_with_value) &&_CUDA_VSTD::_One_of) // + _LIBCUDACXX_REQUIRES((!cuda::property_with_value) && _CUDA_VSTD::_One_of) // friend void get_property(const resource&, Property) noexcept {} _LIBCUDACXX_TEMPLATE(class Property) diff --git a/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.async_resource_ref/async_resource_ref.equality.pass.cpp b/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.async_resource_ref/async_resource_ref.equality.pass.cpp index 6fa187cf60..9140a0eacd 100644 --- a/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.async_resource_ref/async_resource_ref.equality.pass.cpp +++ b/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.async_resource_ref/async_resource_ref.equality.pass.cpp @@ -62,7 +62,7 @@ struct async_resource int _val = 0; _LIBCUDACXX_TEMPLATE(class Property) - _LIBCUDACXX_REQUIRES((!cuda::property_with_value) &&_CUDA_VSTD::_One_of) // + _LIBCUDACXX_REQUIRES((!cuda::property_with_value) && _CUDA_VSTD::_One_of) // friend void get_property(const async_resource&, Property) noexcept {} _LIBCUDACXX_TEMPLATE(class Property) diff --git a/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.async_resource_ref/async_resource_ref.inheritance.pass.cpp b/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.async_resource_ref/async_resource_ref.inheritance.pass.cpp index 6cbe8cd808..2fed448857 100644 --- a/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.async_resource_ref/async_resource_ref.inheritance.pass.cpp +++ b/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.async_resource_ref/async_resource_ref.inheritance.pass.cpp @@ -49,7 +49,7 @@ struct async_resource_base } _LIBCUDACXX_TEMPLATE(class Property) - _LIBCUDACXX_REQUIRES((!cuda::property_with_value) &&_CUDA_VSTD::_One_of) // + _LIBCUDACXX_REQUIRES((!cuda::property_with_value) && _CUDA_VSTD::_One_of) // friend void get_property(const async_resource_base&, Property) noexcept {} _LIBCUDACXX_TEMPLATE(class Property) diff --git a/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.async_resource_ref/async_resource_ref.properties.pass.cpp b/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.async_resource_ref/async_resource_ref.properties.pass.cpp index d616e86eb7..d9680365c2 100644 --- a/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.async_resource_ref/async_resource_ref.properties.pass.cpp +++ b/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.async_resource_ref/async_resource_ref.properties.pass.cpp @@ -70,7 +70,7 @@ struct async_resource int _val = 0; _LIBCUDACXX_TEMPLATE(class Property) - _LIBCUDACXX_REQUIRES((!cuda::property_with_value) &&_CUDA_VSTD::_One_of) // + _LIBCUDACXX_REQUIRES((!cuda::property_with_value) && _CUDA_VSTD::_One_of) // friend void get_property(const async_resource&, Property) noexcept {} _LIBCUDACXX_TEMPLATE(class Property) diff --git a/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.resource_ref/resource_ref.construction.pass.cpp b/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.resource_ref/resource_ref.construction.pass.cpp index 041481da53..9e86f30eb8 100644 --- a/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.resource_ref/resource_ref.construction.pass.cpp +++ b/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.resource_ref/resource_ref.construction.pass.cpp @@ -54,7 +54,7 @@ struct resource int _val = 0; _LIBCUDACXX_TEMPLATE(class Property) - _LIBCUDACXX_REQUIRES((!cuda::property_with_value) &&_CUDA_VSTD::_One_of) // + _LIBCUDACXX_REQUIRES((!cuda::property_with_value) && _CUDA_VSTD::_One_of) // friend void get_property(const resource&, Property) noexcept {} _LIBCUDACXX_TEMPLATE(class Property) diff --git a/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.resource_ref/resource_ref.conversion.pass.cpp b/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.resource_ref/resource_ref.conversion.pass.cpp index 5dfe5f9a9b..f2dfea34a4 100644 --- a/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.resource_ref/resource_ref.conversion.pass.cpp +++ b/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.resource_ref/resource_ref.conversion.pass.cpp @@ -71,7 +71,7 @@ struct resource int _val = 0; _LIBCUDACXX_TEMPLATE(class Property) - _LIBCUDACXX_REQUIRES((!cuda::property_with_value) &&_CUDA_VSTD::_One_of) // + _LIBCUDACXX_REQUIRES((!cuda::property_with_value) && _CUDA_VSTD::_One_of) // friend void get_property(const resource&, Property) noexcept {} _LIBCUDACXX_TEMPLATE(class Property) diff --git a/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.resource_ref/resource_ref.equality.pass.cpp b/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.resource_ref/resource_ref.equality.pass.cpp index d798165b8f..1fa107995c 100644 --- a/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.resource_ref/resource_ref.equality.pass.cpp +++ b/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.resource_ref/resource_ref.equality.pass.cpp @@ -54,7 +54,7 @@ struct resource int _val = 0; _LIBCUDACXX_TEMPLATE(class Property) - _LIBCUDACXX_REQUIRES((!cuda::property_with_value) &&_CUDA_VSTD::_One_of) // + _LIBCUDACXX_REQUIRES((!cuda::property_with_value) && _CUDA_VSTD::_One_of) // friend void get_property(const resource&, Property) noexcept {} _LIBCUDACXX_TEMPLATE(class Property) diff --git a/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.resource_ref/resource_ref.inheritance.pass.cpp b/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.resource_ref/resource_ref.inheritance.pass.cpp index f3e1668640..c99fd2f14d 100644 --- a/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.resource_ref/resource_ref.inheritance.pass.cpp +++ b/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.resource_ref/resource_ref.inheritance.pass.cpp @@ -45,7 +45,7 @@ struct resource_base } _LIBCUDACXX_TEMPLATE(class Property) - _LIBCUDACXX_REQUIRES((!cuda::property_with_value) &&_CUDA_VSTD::_One_of) // + _LIBCUDACXX_REQUIRES((!cuda::property_with_value) && _CUDA_VSTD::_One_of) // friend void get_property(const resource_base&, Property) noexcept {} _LIBCUDACXX_TEMPLATE(class Property) diff --git a/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.resource_ref/resource_ref.properties.pass.cpp b/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.resource_ref/resource_ref.properties.pass.cpp index c992438667..b099915d22 100644 --- a/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.resource_ref/resource_ref.properties.pass.cpp +++ b/libcudacxx/test/libcudacxx/cuda/memory_resource/memory_resource.resource_ref/resource_ref.properties.pass.cpp @@ -61,7 +61,7 @@ struct resource int _val = 0; _LIBCUDACXX_TEMPLATE(class Property) - _LIBCUDACXX_REQUIRES((!cuda::property_with_value) &&_CUDA_VSTD::_One_of) + _LIBCUDACXX_REQUIRES((!cuda::property_with_value) && _CUDA_VSTD::_One_of) friend void get_property(const resource&, Property) noexcept {} _LIBCUDACXX_TEMPLATE(class Property) diff --git a/libcudacxx/test/libcudacxx/cuda/proclaim_return_type.pass.cpp b/libcudacxx/test/libcudacxx/cuda/proclaim_return_type.pass.cpp index 36578b028b..38b8f09555 100644 --- a/libcudacxx/test/libcudacxx/cuda/proclaim_return_type.pass.cpp +++ b/libcudacxx/test/libcudacxx/cuda/proclaim_return_type.pass.cpp @@ -25,11 +25,9 @@ __host__ __device__ void test_lambda_return_type() auto d_lm = [] __device__() -> ReturnT { return ReturnT{}; }; - auto hd_lm = [] __host__ __device__() -> ReturnT { - return ReturnT{}; - }; - using Td = decltype(d_lm); - using Thd = decltype(hd_lm); + auto hd_lm = [] __host__ __device__() -> ReturnT { return ReturnT{}; }; + using Td = decltype(d_lm); + using Thd = decltype(hd_lm); ASSERT_SAME_TYPE(cuda::std::invoke_result_t, ReturnT); ASSERT_SAME_TYPE(cuda::std::invoke_result_t, ReturnT); diff --git a/libcudacxx/test/libcudacxx/cuda/stream_ref/stream_ref.constructor.pass.cpp b/libcudacxx/test/libcudacxx/cuda/stream_ref/stream_ref.constructor.pass.cpp index 50419c2ea9..51d176c8a8 100644 --- a/libcudacxx/test/libcudacxx/cuda/stream_ref/stream_ref.constructor.pass.cpp +++ b/libcudacxx/test/libcudacxx/cuda/stream_ref/stream_ref.constructor.pass.cpp @@ -39,19 +39,21 @@ static_assert(has_value_type, ""); int main(int argc, char** argv) { - NV_IF_TARGET(NV_IS_HOST, - ({ // default construction - cuda::stream_ref ref; - static_assert(noexcept(cuda::stream_ref{}), ""); - assert(ref.get() == reinterpret_cast(0)); - } - - { // from stream - cudaStream_t stream = reinterpret_cast(42); - cuda::stream_ref ref{stream}; - static_assert(noexcept(cuda::stream_ref{stream}), ""); - assert(ref.get() == reinterpret_cast(42)); - })) + NV_IF_TARGET( + NV_IS_HOST, + ( + { // default construction + cuda::stream_ref ref; + static_assert(noexcept(cuda::stream_ref{}), ""); + assert(ref.get() == reinterpret_cast(0)); + } + + { // from stream + cudaStream_t stream = reinterpret_cast(42); + cuda::stream_ref ref{stream}; + static_assert(noexcept(cuda::stream_ref{stream}), ""); + assert(ref.get() == reinterpret_cast(42)); + })) return 0; } diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable.compile.pass.cpp index 719c05671b..a2650b5bc6 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable.compile.pass.cpp @@ -65,7 +65,7 @@ static_assert(equality_comparable, ""); static_assert(equality_comparable, ""); static_assert(equality_comparable, ""); static_assert(equality_comparable, ""); -static_assert(equality_comparable < int(S::*)() volatile&& noexcept >, ""); +static_assert(equality_comparable < int(S::*)() volatile && noexcept >, ""); static_assert(equality_comparable, ""); static_assert(equality_comparable, ""); static_assert(equality_comparable, ""); diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp index c707833030..f229954351 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concept.equalitycomparable/equality_comparable_with.compile.pass.cpp @@ -492,15 +492,15 @@ static_assert(!check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with(), ""); -static_assert(!check_equality_comparable_with < int(S::*)() volatile& noexcept, int (S::*)() && noexcept > (), ""); +static_assert(!check_equality_comparable_with < int(S::*)() volatile & noexcept, int (S::*)() && noexcept > (), ""); static_assert(!check_equality_comparable_with(), ""); -static_assert(!check_equality_comparable_with < int(S::*)() volatile& noexcept, int (S::*)() const&& noexcept > (), ""); +static_assert(!check_equality_comparable_with < int(S::*)() volatile & noexcept, int (S::*)() const&& noexcept > (), ""); static_assert(!check_equality_comparable_with(), ""); -static_assert(!check_equality_comparable_with < int(S::*)() volatile& noexcept, +static_assert(!check_equality_comparable_with < int(S::*)() volatile & noexcept, int (S::*)() volatile&& noexcept > (), ""); static_assert(!check_equality_comparable_with(), ""); -static_assert(!check_equality_comparable_with < int(S::*)() volatile& noexcept, +static_assert(!check_equality_comparable_with < int(S::*)() volatile & noexcept, int (S::*)() const volatile&& noexcept > (), ""); @@ -583,11 +583,13 @@ static_assert(check_equality_comparable_with < int(S::*)() volatile&&, int (S::* static_assert(!check_equality_comparable_with(), ""); static_assert(!check_equality_comparable_with < int(S::*)() volatile&&, int (S::*)() const volatile&& noexcept > (), ""); -static_assert(check_equality_comparable_with < int(S::*)() volatile&& noexcept, +static_assert(check_equality_comparable_with < int(S::*)() volatile && noexcept, int (S::*)() volatile&& noexcept > (), ""); -static_assert(!check_equality_comparable_with < int(S::*)() volatile&& noexcept, int (S::*)() const volatile&& > (), ""); -static_assert(!check_equality_comparable_with < int(S::*)() volatile&& noexcept, +static_assert(!check_equality_comparable_with < int(S::*)() volatile && noexcept, + int (S::*)() const volatile&& > (), + ""); +static_assert(!check_equality_comparable_with < int(S::*)() volatile && noexcept, int (S::*)() const volatile&& noexcept > (), ""); diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered.pass.cpp index 8f9f195785..17689aca79 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered.pass.cpp @@ -102,7 +102,7 @@ static_assert(!totally_ordered, ""); static_assert(!totally_ordered, ""); static_assert(!totally_ordered, ""); static_assert(!totally_ordered, ""); -static_assert(!totally_ordered < int(S::*)() volatile&& noexcept >, ""); +static_assert(!totally_ordered < int(S::*)() volatile && noexcept >, ""); static_assert(!totally_ordered, ""); static_assert(!totally_ordered, ""); static_assert(!totally_ordered, ""); diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered_with.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered_with.pass.cpp index d790895033..a67a915346 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered_with.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.compare/concepts.totallyordered/totally_ordered_with.pass.cpp @@ -468,13 +468,13 @@ static_assert(!check_totally_ordered_with(), ""); static_assert(!check_totally_ordered_with(), ""); -static_assert(!check_totally_ordered_with < int(S::*)() volatile& noexcept, int (S::*)() && noexcept > (), ""); +static_assert(!check_totally_ordered_with < int(S::*)() volatile & noexcept, int (S::*)() && noexcept > (), ""); static_assert(!check_totally_ordered_with(), ""); -static_assert(!check_totally_ordered_with < int(S::*)() volatile& noexcept, int (S::*)() const&& noexcept > (), ""); +static_assert(!check_totally_ordered_with < int(S::*)() volatile & noexcept, int (S::*)() const&& noexcept > (), ""); static_assert(!check_totally_ordered_with(), ""); -static_assert(!check_totally_ordered_with < int(S::*)() volatile& noexcept, int (S::*)() volatile&& noexcept > (), ""); +static_assert(!check_totally_ordered_with < int(S::*)() volatile & noexcept, int (S::*)() volatile&& noexcept > (), ""); static_assert(!check_totally_ordered_with(), ""); -static_assert(!check_totally_ordered_with < int(S::*)() volatile& noexcept, +static_assert(!check_totally_ordered_with < int(S::*)() volatile & noexcept, int (S::*)() const volatile&& noexcept > (), ""); @@ -545,9 +545,9 @@ static_assert(!check_totally_ordered_with < int(S::*)() volatile&&, int (S::*)() static_assert(!check_totally_ordered_with(), ""); static_assert(!check_totally_ordered_with < int(S::*)() volatile&&, int (S::*)() const volatile&& noexcept > (), ""); -static_assert(!check_totally_ordered_with < int(S::*)() volatile&& noexcept, int (S::*)() volatile&& noexcept > (), ""); -static_assert(!check_totally_ordered_with < int(S::*)() volatile&& noexcept, int (S::*)() const volatile&& > (), ""); -static_assert(!check_totally_ordered_with < int(S::*)() volatile&& noexcept, +static_assert(!check_totally_ordered_with < int(S::*)() volatile && noexcept, int (S::*)() volatile&& noexcept > (), ""); +static_assert(!check_totally_ordered_with < int(S::*)() volatile && noexcept, int (S::*)() const volatile&& > (), ""); +static_assert(!check_totally_ordered_with < int(S::*)() volatile && noexcept, int (S::*)() const volatile&& noexcept > (), ""); diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.object/copyable.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.object/copyable.compile.pass.cpp index eba2a92723..6769ea45c4 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.object/copyable.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.object/copyable.compile.pass.cpp @@ -50,7 +50,7 @@ static_assert(copyable, ""); static_assert(copyable, ""); static_assert(copyable, ""); static_assert(copyable, ""); -static_assert(copyable < int(S::*)() volatile&& noexcept >, ""); +static_assert(copyable < int(S::*)() volatile && noexcept >, ""); static_assert(copyable, ""); static_assert(copyable, ""); static_assert(copyable, ""); diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.object/movable.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.object/movable.compile.pass.cpp index 8f36be76de..52cd49b311 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.object/movable.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.object/movable.compile.pass.cpp @@ -51,7 +51,7 @@ static_assert(movable, ""); static_assert(movable, ""); static_assert(movable, ""); static_assert(movable, ""); -static_assert(movable < int(S::*)() volatile&& noexcept >, ""); +static_assert(movable < int(S::*)() volatile && noexcept >, ""); static_assert(movable, ""); static_assert(movable, ""); static_assert(movable, ""); diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.object/regular.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.object/regular.compile.pass.cpp index 2f84098048..cf8a460828 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.object/regular.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.object/regular.compile.pass.cpp @@ -54,7 +54,7 @@ static_assert(regular, ""); static_assert(regular, ""); static_assert(regular, ""); static_assert(regular, ""); -static_assert(regular < int(S::*)() volatile&& noexcept >, ""); +static_assert(regular < int(S::*)() volatile && noexcept >, ""); static_assert(regular, ""); static_assert(regular, ""); static_assert(regular, ""); @@ -83,7 +83,7 @@ static_assert(regular, ""); static_assert(regular, ""); static_assert(regular, ""); static_assert(regular, ""); -static_assert(regular < int(U::*)() volatile&& noexcept >, ""); +static_assert(regular < int(U::*)() volatile && noexcept >, ""); static_assert(regular, ""); static_assert(regular, ""); static_assert(regular, ""); diff --git a/libcudacxx/test/libcudacxx/std/concepts/concepts.object/semiregular.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/concepts/concepts.object/semiregular.compile.pass.cpp index 8d2c7d1113..44e7b55b80 100644 --- a/libcudacxx/test/libcudacxx/std/concepts/concepts.object/semiregular.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/concepts/concepts.object/semiregular.compile.pass.cpp @@ -50,7 +50,7 @@ static_assert(semiregular, ""); static_assert(semiregular, ""); static_assert(semiregular, ""); static_assert(semiregular, ""); -static_assert(semiregular < int(S::*)() volatile&& noexcept >, ""); +static_assert(semiregular < int(S::*)() volatile && noexcept >, ""); static_assert(semiregular, ""); static_assert(semiregular, ""); static_assert(semiregular, ""); diff --git a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/my_int.hpp b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/my_int.hpp index 550d5ef3d1..4f27784cd6 100644 --- a/libcudacxx/test/libcudacxx/std/containers/views/mdspan/my_int.hpp +++ b/libcudacxx/test/libcudacxx/std/containers/views/mdspan/my_int.hpp @@ -30,7 +30,7 @@ struct my_int_non_convertible __host__ __device__ my_int_non_convertible(); __host__ __device__ my_int_non_convertible(my_int val) - : _val(val){}; + : _val(val) {}; __host__ __device__ operator my_int() const noexcept { return _val; @@ -51,7 +51,7 @@ struct my_int_non_nothrow_constructible __host__ __device__ my_int_non_nothrow_constructible(); __host__ __device__ my_int_non_nothrow_constructible(int val) - : _val(val){}; + : _val(val) {}; __host__ __device__ operator int() const { return _val; diff --git a/libcudacxx/test/libcudacxx/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/constraints.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/constraints.compile.pass.cpp index 344f4c9ffb..9db45b75c7 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/constraints.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/constraints.compile.pass.cpp @@ -22,9 +22,7 @@ #if TEST_STD_VER > 2017 template concept has_ranges_next = requires(Args&&... args) { - { - cuda::std::ranges::next(cuda::std::forward(args)...) - }; + { cuda::std::ranges::next(cuda::std::forward(args)...) }; }; #else template diff --git a/libcudacxx/test/libcudacxx/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/constraints.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/constraints.compile.pass.cpp index 6a2ed21930..96cb800447 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/constraints.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/constraints.compile.pass.cpp @@ -22,9 +22,7 @@ #if TEST_STD_VER > 2017 template concept has_ranges_prev = requires(Args&&... args) { - { - cuda::std::ranges::prev(cuda::std::forward(args)...) - }; + { cuda::std::ranges::prev(cuda::std::forward(args)...) }; }; #else template diff --git a/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.assoc.types/incrementable.traits/incrementable_traits.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.assoc.types/incrementable.traits/incrementable_traits.compile.pass.cpp index cb592b0773..ca7cd1f764 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.assoc.types/incrementable.traits/incrementable_traits.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.assoc.types/incrementable.traits/incrementable_traits.compile.pass.cpp @@ -158,7 +158,7 @@ static_assert(!check_has_difference_type); static_assert(!check_has_difference_type); \ static_assert(!check_has_difference_type); \ static_assert(!check_has_difference_type); \ - static_assert(!check_has_difference_type < int(type::*)() cv&& noexcept >); + static_assert(!check_has_difference_type < int(type::*)() cv && noexcept >); struct empty {}; diff --git a/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.readable/indirectly_readable.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.readable/indirectly_readable.compile.pass.cpp index adba973355..9789e6b4da 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.readable/indirectly_readable.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.readable/indirectly_readable.compile.pass.cpp @@ -234,7 +234,7 @@ static_assert(!cuda::std::indirectly_readable); static_assert(!cuda::std::indirectly_readable); static_assert(!cuda::std::indirectly_readable); static_assert(!cuda::std::indirectly_readable); -static_assert(!cuda::std::indirectly_readable < int(S::*)() volatile&& noexcept >); +static_assert(!cuda::std::indirectly_readable < int(S::*)() volatile && noexcept >); int main(int, char**) { diff --git a/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.winc/weakly_incrementable.compile.pass.cpp b/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.winc/weakly_incrementable.compile.pass.cpp index a0c7d5a86d..a9e2a8d0cf 100644 --- a/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.winc/weakly_incrementable.compile.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.winc/weakly_incrementable.compile.pass.cpp @@ -42,7 +42,7 @@ static_assert(!cuda::std::weakly_incrementable); static_assert(!cuda::std::weakly_incrementable); \ static_assert(!cuda::std::weakly_incrementable); \ static_assert(!cuda::std::weakly_incrementable); \ - static_assert(!cuda::std::weakly_incrementable < int(S::*)() qualifier&& noexcept >); + static_assert(!cuda::std::weakly_incrementable < int(S::*)() qualifier && noexcept >); #define NO_QUALIFIER CHECK_POINTER_TO_MEMBER_FUNCTIONS(NO_QUALIFIER); diff --git a/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.bind_front/bind_front.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.bind_front/bind_front.pass.cpp index 9615105074..c91b7a1701 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.bind_front/bind_front.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.bind_front/bind_front.pass.cpp @@ -49,8 +49,8 @@ template struct is_bind_frontable { template - __host__ __device__ static auto test(int) - -> decltype((void) cuda::std::bind_front(cuda::std::declval()...), cuda::std::true_type()); + __host__ __device__ static auto + test(int) -> decltype((void) cuda::std::bind_front(cuda::std::declval()...), cuda::std::true_type()); template __host__ __device__ static cuda::std::false_type test(...); diff --git a/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.invoke/invoke.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.invoke/invoke.pass.cpp index 409924e24b..3585e6dce9 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.invoke/invoke.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/function.objects/func.invoke/invoke.pass.cpp @@ -188,7 +188,7 @@ __host__ __device__ void bullet_one_two_tests() test_b12(cl); test_b12(cl); - test_b12(cuda::std::move(cl)); + test_b12(cuda::std::move(cl)); test_b12(cuda::std::move(cl)); test_b12(cuda::std::move(cl)); test_b12(cuda::std::move(cl)); @@ -200,7 +200,7 @@ __host__ __device__ void bullet_one_two_tests() test_b12(cl); test_b12(cl); - test_b12(cuda::std::move(cl)); + test_b12(cuda::std::move(cl)); test_b12(cuda::std::move(cl)); test_b12(cuda::std::move(cl)); test_b12(cuda::std::move(cl)); diff --git a/libcudacxx/test/libcudacxx/std/utilities/memory/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/default.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/memory/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/default.pass.cpp index ab1ced437e..29c5ce6375 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/memory/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/default.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/memory/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/default.pass.cpp @@ -91,13 +91,14 @@ __host__ __device__ TEST_CONSTEXPR_CXX23 bool test_basic() } #ifndef __CUDACC__ -DEFINE_AND_RUN_IS_INCOMPLETE_TEST({ - doIncompleteTypeTest(0); - doIncompleteTypeTest>(0); -} { - doIncompleteTypeTest(0); - doIncompleteTypeTest>(0); -}) +DEFINE_AND_RUN_IS_INCOMPLETE_TEST( + { + doIncompleteTypeTest(0); + doIncompleteTypeTest>(0); + } { + doIncompleteTypeTest(0); + doIncompleteTypeTest>(0); + }) #endif // __CUDACC__ __host__ __device__ TEST_CONSTEXPR_CXX23 bool test() diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp index 8a187fa429..96988b28bc 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.trans/meta.trans.other/common_type.pass.cpp @@ -88,8 +88,7 @@ template using always_bool = typename always_bool_imp::type; template -__host__ __device__ constexpr auto no_common_type_imp(int) - -> always_bool::type> +__host__ __device__ constexpr auto no_common_type_imp(int) -> always_bool::type> { return false; } diff --git a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.monadic/or_else.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.monadic/or_else.pass.cpp index 8b6843593a..5a0fbc0b8c 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/optional/optional.monadic/or_else.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/optional/optional.monadic/or_else.pass.cpp @@ -28,9 +28,7 @@ struct NonMovable template concept has_or_else = requires(Opt&& opt, F&& f) { - { - cuda::std::forward(opt).or_else(cuda::std::forward(f)) - }; + { cuda::std::forward(opt).or_else(cuda::std::forward(f)) }; }; #else diff --git a/libcudacxx/test/libcudacxx/std/utilities/utility/utility.swap/swap.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/utility/utility.swap/swap.pass.cpp index d5fb17b1b4..8fe232b349 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/utility/utility.swap/swap.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/utility/utility.swap/swap.pass.cpp @@ -74,8 +74,8 @@ struct NotMoveAssignable }; template -__host__ __device__ auto can_swap_test(int) - -> decltype(cuda::std::swap(cuda::std::declval(), cuda::std::declval())); +__host__ __device__ auto +can_swap_test(int) -> decltype(cuda::std::swap(cuda::std::declval(), cuda::std::declval())); template __host__ __device__ auto can_swap_test(...) -> cuda::std::false_type; diff --git a/libcudacxx/test/libcudacxx/std/utilities/utility/utility.swap/swap_array.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/utility/utility.swap/swap_array.pass.cpp index 4cc02b7405..ba4cbef259 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/utility/utility.swap/swap_array.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/utility/utility.swap/swap_array.pass.cpp @@ -59,8 +59,8 @@ struct NotMoveConstructible }; template -__host__ __device__ auto can_swap_test(int) - -> decltype(cuda::std::swap(cuda::std::declval(), cuda::std::declval())); +__host__ __device__ auto +can_swap_test(int) -> decltype(cuda::std::swap(cuda::std::declval(), cuda::std::declval())); template __host__ __device__ auto can_swap_test(...) -> cuda::std::false_type; diff --git a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp index 77b94fd8fc..ec2a53f5a7 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp @@ -472,8 +472,8 @@ void test_exceptions_different_alternatives() #endif // !TEST_HAS_NO_EXCEPTIONS template -__host__ __device__ constexpr auto has_swap_member_imp(int) - -> decltype(cuda::std::declval().swap(cuda::std::declval()), true) +__host__ __device__ constexpr auto +has_swap_member_imp(int) -> decltype(cuda::std::declval().swap(cuda::std::declval()), true) { return true; } diff --git a/libcudacxx/test/support/charconv_test_helpers.h b/libcudacxx/test/support/charconv_test_helpers.h index c334ebfab5..09e50e90ef 100644 --- a/libcudacxx/test/support/charconv_test_helpers.h +++ b/libcudacxx/test/support/charconv_test_helpers.h @@ -128,8 +128,8 @@ struct to_chars_test_base return r; } - static auto fromchars(char const* p, char const* ep, int base = 10) - -> decltype(fromchars(p, ep, base, std::is_signed())) + static auto + fromchars(char const* p, char const* ep, int base = 10) -> decltype(fromchars(p, ep, base, std::is_signed())) { return fromchars(p, ep, base, std::is_signed()); } diff --git a/libcudacxx/test/support/counting_predicates.h b/libcudacxx/test/support/counting_predicates.h index 227466e139..85bce9875c 100644 --- a/libcudacxx/test/support/counting_predicates.h +++ b/libcudacxx/test/support/counting_predicates.h @@ -91,16 +91,16 @@ class counting_predicate {} template - __host__ __device__ TEST_CONSTEXPR_CXX14 auto operator()(Args&&... args) - -> decltype(pred_(cuda::std::forward(args)...)) + __host__ __device__ TEST_CONSTEXPR_CXX14 auto + operator()(Args&&... args) -> decltype(pred_(cuda::std::forward(args)...)) { ++(*count_); return pred_(cuda::std::forward(args)...); } template - __host__ __device__ TEST_CONSTEXPR_CXX14 auto operator()(Args&&... args) const - -> decltype(pred_(cuda::std::forward(args)...)) + __host__ __device__ TEST_CONSTEXPR_CXX14 auto + operator()(Args&&... args) const -> decltype(pred_(cuda::std::forward(args)...)) { ++(*count_); return pred_(cuda::std::forward(args)...); diff --git a/libcudacxx/test/support/filesystem_test_helper.h b/libcudacxx/test/support/filesystem_test_helper.h index 0737fa2fd3..6f5bef77d2 100644 --- a/libcudacxx/test/support/filesystem_test_helper.h +++ b/libcudacxx/test/support/filesystem_test_helper.h @@ -321,10 +321,7 @@ struct scoped_test_env #define CONCAT2(LHS, RHS) LHS##RHS #define CONCAT(LHS, RHS) CONCAT2(LHS, RHS) -#define MKSTR(Str) \ - { \ - Str, CONCAT(L, Str), CONCAT(u, Str), CONCAT(U, Str) \ - } +#define MKSTR(Str) {Str, CONCAT(L, Str), CONCAT(u, Str), CONCAT(U, Str)} struct MultiStringType { diff --git a/libcudacxx/test/support/is_transparent.h b/libcudacxx/test/support/is_transparent.h index 3924187444..35fa5ed1af 100644 --- a/libcudacxx/test/support/is_transparent.h +++ b/libcudacxx/test/support/is_transparent.h @@ -17,8 +17,8 @@ struct transparent_less { template - constexpr auto operator()(T&& t, U&& u) const noexcept(noexcept(std::forward(t) < std::forward(u))) - -> decltype(std::forward(t) < std::forward(u)) + constexpr auto operator()(T&& t, U&& u) const + noexcept(noexcept(std::forward(t) < std::forward(u))) -> decltype(std::forward(t) < std::forward(u)) { return std::forward(t) < std::forward(u); } @@ -28,8 +28,8 @@ struct transparent_less struct transparent_less_not_referenceable { template - constexpr auto operator()(T&& t, U&& u) const noexcept(noexcept(std::forward(t) < std::forward(u))) - -> decltype(std::forward(t) < std::forward(u)) + constexpr auto operator()(T&& t, U&& u) const + noexcept(noexcept(std::forward(t) < std::forward(u))) -> decltype(std::forward(t) < std::forward(u)) { return std::forward(t) < std::forward(u); } @@ -39,8 +39,8 @@ struct transparent_less_not_referenceable struct transparent_less_no_type { template - constexpr auto operator()(T&& t, U&& u) const noexcept(noexcept(std::forward(t) < std::forward(u))) - -> decltype(std::forward(t) < std::forward(u)) + constexpr auto operator()(T&& t, U&& u) const + noexcept(noexcept(std::forward(t) < std::forward(u))) -> decltype(std::forward(t) < std::forward(u)) { return std::forward(t) < std::forward(u); } @@ -52,8 +52,8 @@ struct transparent_less_no_type struct transparent_less_private { template - constexpr auto operator()(T&& t, U&& u) const noexcept(noexcept(std::forward(t) < std::forward(u))) - -> decltype(std::forward(t) < std::forward(u)) + constexpr auto operator()(T&& t, U&& u) const + noexcept(noexcept(std::forward(t) < std::forward(u))) -> decltype(std::forward(t) < std::forward(u)) { return std::forward(t) < std::forward(u); } @@ -65,8 +65,8 @@ struct transparent_less_private struct transparent_less_not_a_type { template - constexpr auto operator()(T&& t, U&& u) const noexcept(noexcept(std::forward(t) < std::forward(u))) - -> decltype(std::forward(t) < std::forward(u)) + constexpr auto operator()(T&& t, U&& u) const + noexcept(noexcept(std::forward(t) < std::forward(u))) -> decltype(std::forward(t) < std::forward(u)) { return std::forward(t) < std::forward(u); } diff --git a/libcudacxx/test/support/test_convertible.h b/libcudacxx/test/support/test_convertible.h index 5de6472f65..843a4e3684 100644 --- a/libcudacxx/test/support/test_convertible.h +++ b/libcudacxx/test/support/test_convertible.h @@ -24,8 +24,8 @@ template __host__ __device__ void eat_type(Tp); template -__host__ __device__ constexpr auto test_convertible_imp(int) - -> decltype(eat_type({cuda::std::declval()...}), true) +__host__ __device__ constexpr auto +test_convertible_imp(int) -> decltype(eat_type({cuda::std::declval()...}), true) { return true; } diff --git a/thrust/testing/unittest/testframework.h b/thrust/testing/unittest/testframework.h index 79b5adf6b1..5eb9aabbb2 100644 --- a/thrust/testing/unittest/testframework.h +++ b/thrust/testing/unittest/testframework.h @@ -324,7 +324,7 @@ class UnitTestDriver virtual bool post_test_smoke_check(const UnitTest& test, bool concise); public: - inline virtual ~UnitTestDriver(){}; + inline virtual ~UnitTestDriver() {}; void register_test(UnitTest* test); virtual bool run_tests(const ArgumentSet& args, const ArgumentMap& kwargs); diff --git a/thrust/thrust/allocate_unique.h b/thrust/thrust/allocate_unique.h index cd52327abe..100d654111 100644 --- a/thrust/thrust/allocate_unique.h +++ b/thrust/thrust/allocate_unique.h @@ -274,12 +274,12 @@ allocate_unique(Allocator const& alloc, Args&&... args) } template -_CCCL_HOST std::unique_ptr< - T, - uninitialized_allocator_delete< - T, - typename detail::allocator_traits::type>::type>:: - template rebind_traits::allocator_type>> +_CCCL_HOST +std::unique_ptr::type>::type>::template rebind_traits::allocator_type>> uninitialized_allocate_unique(Allocator const& alloc) { using traits = typename detail::allocator_traits< @@ -322,12 +322,12 @@ allocate_unique_n(Allocator const& alloc, Size n, Args&&... args) } template -_CCCL_HOST std::unique_ptr< - T[], - uninitialized_array_allocator_delete< - T, - typename detail::allocator_traits::type>::type>:: - template rebind_traits::allocator_type>> +_CCCL_HOST +std::unique_ptr::type>::type>::template rebind_traits::allocator_type>> uninitialized_allocate_unique_n(Allocator const& alloc, Size n) { using traits = typename detail::allocator_traits< diff --git a/thrust/thrust/detail/advance.inl b/thrust/thrust/detail/advance.inl index 0ec0a7d622..fe84d373b5 100644 --- a/thrust/thrust/detail/advance.inl +++ b/thrust/thrust/detail/advance.inl @@ -59,9 +59,9 @@ prev(BidirectionalIterator i, typename iterator_traits::d template _CCCL_HOST_DEVICE - typename detail::disable_if>::value, - BidirectionalIterator>::type - prev(BidirectionalIterator i, typename detail::pointer_traits::difference_type n = 1) +typename detail::disable_if>::value, + BidirectionalIterator>::type +prev(BidirectionalIterator i, typename detail::pointer_traits::difference_type n = 1) { thrust::system::detail::generic::advance(i, -n); return i; diff --git a/thrust/thrust/detail/allocator/copy_construct_range.inl b/thrust/thrust/detail/allocator/copy_construct_range.inl index 96d794fc47..27b132de40 100644 --- a/thrust/thrust/detail/allocator/copy_construct_range.inl +++ b/thrust/thrust/detail/allocator/copy_construct_range.inl @@ -178,13 +178,13 @@ uninitialized_copy_with_allocator_n( template _CCCL_HOST_DEVICE - typename disable_if::type>::value, - Pointer>::type - copy_construct_range(thrust::execution_policy& from_system, - Allocator& a, - InputIterator first, - InputIterator last, - Pointer result) +typename disable_if::type>::value, + Pointer>::type +copy_construct_range(thrust::execution_policy& from_system, + Allocator& a, + InputIterator first, + InputIterator last, + Pointer result) { // just call two_system_copy return thrust::detail::two_system_copy(from_system, allocator_system::get(a), first, last, result); @@ -192,10 +192,10 @@ _CCCL_HOST_DEVICE template _CCCL_HOST_DEVICE - typename disable_if::type>::value, - Pointer>::type - copy_construct_range_n( - thrust::execution_policy& from_system, Allocator& a, InputIterator first, Size n, Pointer result) +typename disable_if::type>::value, + Pointer>::type +copy_construct_range_n( + thrust::execution_policy& from_system, Allocator& a, InputIterator first, Size n, Pointer result) { // just call two_system_copy_n return thrust::detail::two_system_copy_n(from_system, allocator_system::get(a), first, n, result); diff --git a/thrust/thrust/detail/allocator/default_construct_range.inl b/thrust/thrust/detail/allocator/default_construct_range.inl index 0cd4f82ecc..36db08c111 100644 --- a/thrust/thrust/detail/allocator/default_construct_range.inl +++ b/thrust/thrust/detail/allocator/default_construct_range.inl @@ -79,8 +79,8 @@ default_construct_range(Allocator& a, Pointer p, Size n) } template -_CCCL_HOST_DEVICE typename disable_if< - needs_default_construct_via_allocator::type>::value>::type +_CCCL_HOST_DEVICE +typename disable_if::type>::value>::type default_construct_range(Allocator& a, Pointer p, Size n) { thrust::uninitialized_fill_n(allocator_system::get(a), p, n, typename pointer_element::type()); diff --git a/thrust/thrust/detail/functional/operators/arithmetic_operators.h b/thrust/thrust/detail/functional/operators/arithmetic_operators.h index 6306cc4409..024b0e0d95 100644 --- a/thrust/thrust/detail/functional/operators/arithmetic_operators.h +++ b/thrust/thrust/detail/functional/operators/arithmetic_operators.h @@ -50,8 +50,8 @@ struct unary_plus _CCCL_EXEC_CHECK_DISABLE template - _CCCL_HOST_DEVICE constexpr auto operator()(T1&& t1) const noexcept(noexcept(+THRUST_FWD(t1))) - -> decltype(+THRUST_FWD(t1)) + _CCCL_HOST_DEVICE constexpr auto operator()(T1&& t1) const + noexcept(noexcept(+THRUST_FWD(t1))) -> decltype(+THRUST_FWD(t1)) { return +THRUST_FWD(t1); } @@ -107,16 +107,16 @@ operator-(const actor& _1, const actor& _2) template _CCCL_HOST_DEVICE - actor>, typename as_actor::type, actor>> - operator*(const T1& _1, const actor& _2) +actor>, typename as_actor::type, actor>> +operator*(const T1& _1, const actor& _2) { return compose(transparent_binary_operator>(), make_actor(_1), make_actor(_2)); } // end operator*() template _CCCL_HOST_DEVICE - actor>, actor, typename as_actor::type>> - operator*(const actor& _1, const T2& _2) +actor>, actor, typename as_actor::type>> +operator*(const actor& _1, const T2& _2) { return compose(transparent_binary_operator>(), make_actor(_1), make_actor(_2)); } // end operator*() @@ -130,16 +130,16 @@ operator*(const actor& _1, const actor& _2) template _CCCL_HOST_DEVICE - actor>, actor, typename as_actor::type>> - operator/(const actor& _1, const T2& _2) +actor>, actor, typename as_actor::type>> +operator/(const actor& _1, const T2& _2) { return compose(transparent_binary_operator>(), make_actor(_1), make_actor(_2)); } // end operator/() template _CCCL_HOST_DEVICE - actor>, typename as_actor::type, actor>> - operator/(const T1& _1, const actor& _2) +actor>, typename as_actor::type, actor>> +operator/(const T1& _1, const actor& _2) { return compose(transparent_binary_operator>(), make_actor(_1), make_actor(_2)); } // end operator/() @@ -153,16 +153,16 @@ operator/(const actor& _1, const actor& _2) template _CCCL_HOST_DEVICE - actor>, actor, typename as_actor::type>> - operator%(const actor& _1, const T2& _2) +actor>, actor, typename as_actor::type>> +operator%(const actor& _1, const T2& _2) { return compose(transparent_binary_operator>(), make_actor(_1), make_actor(_2)); } // end operator%() template _CCCL_HOST_DEVICE - actor>, typename as_actor::type, actor>> - operator%(const T1& _1, const actor& _2) +actor>, typename as_actor::type, actor>> +operator%(const T1& _1, const actor& _2) { return compose(transparent_binary_operator>(), make_actor(_1), make_actor(_2)); } // end operator%() @@ -181,8 +181,8 @@ struct prefix_increment _CCCL_EXEC_CHECK_DISABLE template - _CCCL_HOST_DEVICE constexpr auto operator()(T1&& t1) const noexcept(noexcept(++THRUST_FWD(t1))) - -> decltype(++THRUST_FWD(t1)) + _CCCL_HOST_DEVICE constexpr auto operator()(T1&& t1) const + noexcept(noexcept(++THRUST_FWD(t1))) -> decltype(++THRUST_FWD(t1)) { return ++THRUST_FWD(t1); } @@ -202,8 +202,8 @@ struct postfix_increment _CCCL_EXEC_CHECK_DISABLE template - _CCCL_HOST_DEVICE constexpr auto operator()(T1&& t1) const noexcept(noexcept(THRUST_FWD(t1)++)) - -> decltype(THRUST_FWD(t1)++) + _CCCL_HOST_DEVICE constexpr auto operator()(T1&& t1) const + noexcept(noexcept(THRUST_FWD(t1)++)) -> decltype(THRUST_FWD(t1)++) { return THRUST_FWD(t1)++; } @@ -223,8 +223,8 @@ struct prefix_decrement _CCCL_EXEC_CHECK_DISABLE template - _CCCL_HOST_DEVICE constexpr auto operator()(T1&& t1) const noexcept(noexcept(--THRUST_FWD(t1))) - -> decltype(--THRUST_FWD(t1)) + _CCCL_HOST_DEVICE constexpr auto operator()(T1&& t1) const + noexcept(noexcept(--THRUST_FWD(t1))) -> decltype(--THRUST_FWD(t1)) { return --THRUST_FWD(t1); } @@ -244,8 +244,8 @@ struct postfix_decrement _CCCL_EXEC_CHECK_DISABLE template - _CCCL_HOST_DEVICE constexpr auto operator()(T1&& t1) const noexcept(noexcept(THRUST_FWD(t1)--)) - -> decltype(THRUST_FWD(t1)--) + _CCCL_HOST_DEVICE constexpr auto operator()(T1&& t1) const + noexcept(noexcept(THRUST_FWD(t1)--)) -> decltype(THRUST_FWD(t1)--) { return THRUST_FWD(t1)--; } diff --git a/thrust/thrust/detail/functional/operators/bitwise_operators.h b/thrust/thrust/detail/functional/operators/bitwise_operators.h index 19ed9efb8e..c41250a79e 100644 --- a/thrust/thrust/detail/functional/operators/bitwise_operators.h +++ b/thrust/thrust/detail/functional/operators/bitwise_operators.h @@ -106,8 +106,8 @@ struct bit_not _CCCL_EXEC_CHECK_DISABLE template - _CCCL_HOST_DEVICE constexpr auto operator()(T1&& t1) const noexcept(noexcept(~THRUST_FWD(t1))) - -> decltype(~THRUST_FWD(t1)) + _CCCL_HOST_DEVICE constexpr auto operator()(T1&& t1) const + noexcept(noexcept(~THRUST_FWD(t1))) -> decltype(~THRUST_FWD(t1)) { return ~THRUST_FWD(t1); } diff --git a/thrust/thrust/detail/functional/operators/logical_operators.h b/thrust/thrust/detail/functional/operators/logical_operators.h index 58315fb916..75ed46cc96 100644 --- a/thrust/thrust/detail/functional/operators/logical_operators.h +++ b/thrust/thrust/detail/functional/operators/logical_operators.h @@ -38,16 +38,16 @@ namespace functional template _CCCL_HOST_DEVICE - actor>, actor, typename as_actor::type>> - operator&&(const actor& _1, const T2& _2) +actor>, actor, typename as_actor::type>> +operator&&(const actor& _1, const T2& _2) { return compose(transparent_binary_operator>(), make_actor(_1), make_actor(_2)); } // end operator&&() template _CCCL_HOST_DEVICE - actor>, typename as_actor::type, actor>> - operator&&(const T1& _1, const actor& _2) +actor>, typename as_actor::type, actor>> +operator&&(const T1& _1, const actor& _2) { return compose(transparent_binary_operator>(), make_actor(_1), make_actor(_2)); } // end operator&&() @@ -61,16 +61,16 @@ operator&&(const actor& _1, const actor& _2) template _CCCL_HOST_DEVICE - actor>, actor, typename as_actor::type>> - operator||(const actor& _1, const T2& _2) +actor>, actor, typename as_actor::type>> +operator||(const actor& _1, const T2& _2) { return compose(transparent_binary_operator>(), make_actor(_1), make_actor(_2)); } // end operator&&() template _CCCL_HOST_DEVICE - actor>, typename as_actor::type, actor>> - operator||(const T1& _1, const actor& _2) +actor>, typename as_actor::type, actor>> +operator||(const T1& _1, const actor& _2) { return compose(transparent_binary_operator>(), make_actor(_1), make_actor(_2)); } // end operator&&() diff --git a/thrust/thrust/detail/functional/operators/relational_operators.h b/thrust/thrust/detail/functional/operators/relational_operators.h index d20980e709..d58c2fb67f 100644 --- a/thrust/thrust/detail/functional/operators/relational_operators.h +++ b/thrust/thrust/detail/functional/operators/relational_operators.h @@ -38,16 +38,16 @@ namespace functional template _CCCL_HOST_DEVICE - actor>, actor, typename as_actor::type>> - operator==(const actor& _1, const T2& _2) +actor>, actor, typename as_actor::type>> +operator==(const actor& _1, const T2& _2) { return compose(transparent_binary_operator>(), make_actor(_1), make_actor(_2)); } // end operator==() template _CCCL_HOST_DEVICE - actor>, typename as_actor::type, actor>> - operator==(const T1& _1, const actor& _2) +actor>, typename as_actor::type, actor>> +operator==(const T1& _1, const actor& _2) { return compose(transparent_binary_operator>(), make_actor(_1), make_actor(_2)); } // end operator==() @@ -61,16 +61,16 @@ operator==(const actor& _1, const actor& _2) template _CCCL_HOST_DEVICE - actor>, actor, typename as_actor::type>> - operator!=(const actor& _1, const T2& _2) +actor>, actor, typename as_actor::type>> +operator!=(const actor& _1, const T2& _2) { return compose(transparent_binary_operator>(), make_actor(_1), make_actor(_2)); } // end operator!=() template _CCCL_HOST_DEVICE - actor>, typename as_actor::type, actor>> - operator!=(const T1& _1, const actor& _2) +actor>, typename as_actor::type, actor>> +operator!=(const T1& _1, const actor& _2) { return compose(transparent_binary_operator>(), make_actor(_1), make_actor(_2)); } // end operator!=() @@ -84,16 +84,16 @@ operator!=(const actor& _1, const actor& _2) template _CCCL_HOST_DEVICE - actor>, actor, typename as_actor::type>> - operator>(const actor& _1, const T2& _2) +actor>, actor, typename as_actor::type>> +operator>(const actor& _1, const T2& _2) { return compose(transparent_binary_operator>(), make_actor(_1), make_actor(_2)); } // end operator>() template _CCCL_HOST_DEVICE - actor>, typename as_actor::type, actor>> - operator>(const T1& _1, const actor& _2) +actor>, typename as_actor::type, actor>> +operator>(const T1& _1, const actor& _2) { return compose(transparent_binary_operator>(), make_actor(_1), make_actor(_2)); } // end operator>() @@ -128,16 +128,16 @@ operator<(const actor& _1, const actor& _2) template _CCCL_HOST_DEVICE - actor>, actor, typename as_actor::type>> - operator>=(const actor& _1, const T2& _2) +actor>, actor, typename as_actor::type>> +operator>=(const actor& _1, const T2& _2) { return compose(transparent_binary_operator>(), make_actor(_1), make_actor(_2)); } // end operator>=() template _CCCL_HOST_DEVICE - actor>, typename as_actor::type, actor>> - operator>=(const T1& _1, const actor& _2) +actor>, typename as_actor::type, actor>> +operator>=(const T1& _1, const actor& _2) { return compose(transparent_binary_operator>(), make_actor(_1), make_actor(_2)); } // end operator>=() @@ -151,16 +151,16 @@ operator>=(const actor& _1, const actor& _2) template _CCCL_HOST_DEVICE - actor>, actor, typename as_actor::type>> - operator<=(const actor& _1, const T2& _2) +actor>, actor, typename as_actor::type>> +operator<=(const actor& _1, const T2& _2) { return compose(transparent_binary_operator>(), make_actor(_1), make_actor(_2)); } // end operator<=() template _CCCL_HOST_DEVICE - actor>, typename as_actor::type, actor>> - operator<=(const T1& _1, const actor& _2) +actor>, typename as_actor::type, actor>> +operator<=(const T1& _1, const actor& _2) { return compose(transparent_binary_operator>(), make_actor(_1), make_actor(_2)); } // end operator<=() diff --git a/thrust/thrust/detail/pointer.h b/thrust/thrust/detail/pointer.h index 1607a16bea..622da52a12 100644 --- a/thrust/thrust/detail/pointer.h +++ b/thrust/thrust/detail/pointer.h @@ -187,8 +187,8 @@ class pointer : public thrust::detail::pointer_base _CCCL_HOST_DEVICE - typename thrust::detail::enable_if_pointer_is_convertible::type - operator=(const OtherPointer& other); + typename thrust::detail::enable_if_pointer_is_convertible::type + operator=(const OtherPointer& other); // observers diff --git a/thrust/thrust/detail/range/head_flags.h b/thrust/thrust/detail/range/head_flags.h index c610476b6e..408d9b6474 100644 --- a/thrust/thrust/detail/range/head_flags.h +++ b/thrust/thrust/detail/range/head_flags.h @@ -91,8 +91,8 @@ class head_flags_with_init _CCCL_EXEC_CHECK_DISABLE _CCCL_HOST_DEVICE head_flags_with_init(RandomAccessIterator first, RandomAccessIterator last, init_type init) : m_begin(thrust::make_transform_iterator( - thrust::make_zip_iterator(thrust::make_tuple(thrust::counting_iterator(0), first, first - 1)), - head_flag_functor(init, last - first))) + thrust::make_zip_iterator(thrust::make_tuple(thrust::counting_iterator(0), first, first - 1)), + head_flag_functor(init, last - first))) , m_end(m_begin + (last - first)) {} @@ -100,8 +100,8 @@ class head_flags_with_init _CCCL_HOST_DEVICE head_flags_with_init( RandomAccessIterator first, RandomAccessIterator last, init_type init, BinaryPredicate binary_pred) : m_begin(thrust::make_transform_iterator( - thrust::make_zip_iterator(thrust::make_tuple(thrust::counting_iterator(0), first, first - 1)), - head_flag_functor(init, last - first, binary_pred))) + thrust::make_zip_iterator(thrust::make_tuple(thrust::counting_iterator(0), first, first - 1)), + head_flag_functor(init, last - first, binary_pred))) , m_end(m_begin + (last - first)) {} @@ -174,15 +174,15 @@ class head_flags _CCCL_HOST_DEVICE head_flags(RandomAccessIterator first, RandomAccessIterator last) : m_begin(thrust::make_transform_iterator( - thrust::make_zip_iterator(thrust::make_tuple(thrust::counting_iterator(0), first, first - 1)), - head_flag_functor(last - first))) + thrust::make_zip_iterator(thrust::make_tuple(thrust::counting_iterator(0), first, first - 1)), + head_flag_functor(last - first))) , m_end(m_begin + (last - first)) {} _CCCL_HOST_DEVICE head_flags(RandomAccessIterator first, RandomAccessIterator last, BinaryPredicate binary_pred) : m_begin(thrust::make_transform_iterator( - thrust::make_zip_iterator(thrust::make_tuple(thrust::counting_iterator(0), first, first - 1)), - head_flag_functor(last - first, binary_pred))) + thrust::make_zip_iterator(thrust::make_tuple(thrust::counting_iterator(0), first, first - 1)), + head_flag_functor(last - first, binary_pred))) , m_end(m_begin + (last - first)) {} diff --git a/thrust/thrust/detail/range/tail_flags.h b/thrust/thrust/detail/range/tail_flags.h index 242290f330..48470c0f36 100644 --- a/thrust/thrust/detail/range/tail_flags.h +++ b/thrust/thrust/detail/range/tail_flags.h @@ -80,14 +80,14 @@ class tail_flags _CCCL_EXEC_CHECK_DISABLE _CCCL_HOST_DEVICE tail_flags(RandomAccessIterator first, RandomAccessIterator last) : m_begin( - thrust::make_transform_iterator(thrust::counting_iterator(0), tail_flag_functor(first, last))) + thrust::make_transform_iterator(thrust::counting_iterator(0), tail_flag_functor(first, last))) , m_end(m_begin + (last - first)) {} _CCCL_EXEC_CHECK_DISABLE _CCCL_HOST_DEVICE tail_flags(RandomAccessIterator first, RandomAccessIterator last, BinaryPredicate binary_pred) : m_begin(thrust::make_transform_iterator( - thrust::counting_iterator(0), tail_flag_functor(first, last, binary_pred))) + thrust::counting_iterator(0), tail_flag_functor(first, last, binary_pred))) , m_end(m_begin + (last - first)) {} diff --git a/thrust/thrust/detail/reference.h b/thrust/thrust/detail/reference.h index 0df3d4ee0a..c96649f74e 100644 --- a/thrust/thrust/detail/reference.h +++ b/thrust/thrust/detail/reference.h @@ -126,19 +126,19 @@ class reference */ template _CCCL_HOST_DEVICE - /*! \cond - */ - typename std::enable_if< - std::is_convertible::pointer, pointer>::value, - /*! \endcond - */ - derived_type& - /*! \cond - */ - >::type + /*! \cond + */ + typename std::enable_if< + std::is_convertible::pointer, pointer>::value, /*! \endcond */ - operator=(reference const& other) + derived_type& + /*! \cond + */ + >::type + /*! \endcond + */ + operator=(reference const& other) { assign_from(&other); return derived(); diff --git a/thrust/thrust/detail/temporary_buffer.h b/thrust/thrust/detail/temporary_buffer.h index 0b3d500fd0..11f26e0ac1 100644 --- a/thrust/thrust/detail/temporary_buffer.h +++ b/thrust/thrust/detail/temporary_buffer.h @@ -39,8 +39,8 @@ namespace detail template _CCCL_HOST_DEVICE - thrust::pair, typename thrust::pointer::difference_type> - down_cast_pair(Pair p) +thrust::pair, typename thrust::pointer::difference_type> +down_cast_pair(Pair p) { // XXX should use a hypothetical thrust::static_pointer_cast here thrust::pointer ptr = @@ -56,9 +56,9 @@ _CCCL_HOST_DEVICE _CCCL_EXEC_CHECK_DISABLE template _CCCL_HOST_DEVICE - thrust::pair, typename thrust::pointer::difference_type> - get_temporary_buffer(const thrust::detail::execution_policy_base& exec, - typename thrust::pointer::difference_type n) +thrust::pair, typename thrust::pointer::difference_type> +get_temporary_buffer(const thrust::detail::execution_policy_base& exec, + typename thrust::pointer::difference_type n) { using thrust::detail::get_temporary_buffer; // execute_with_allocator using thrust::system::detail::generic::get_temporary_buffer; diff --git a/thrust/thrust/functional.h b/thrust/thrust/functional.h index 00649939a7..581568f445 100644 --- a/thrust/thrust/functional.h +++ b/thrust/thrust/functional.h @@ -1412,8 +1412,8 @@ struct project1st using is_transparent = void; _CCCL_EXEC_CHECK_DISABLE template - _CCCL_HOST_DEVICE constexpr auto operator()(T1&& t1, T2&&) const noexcept(noexcept(THRUST_FWD(t1))) - -> decltype(THRUST_FWD(t1)) + _CCCL_HOST_DEVICE constexpr auto operator()(T1&& t1, T2&&) const + noexcept(noexcept(THRUST_FWD(t1))) -> decltype(THRUST_FWD(t1)) { return THRUST_FWD(t1); } @@ -1472,8 +1472,8 @@ struct project2nd using is_transparent = void; _CCCL_EXEC_CHECK_DISABLE template - _CCCL_HOST_DEVICE constexpr auto operator()(T1&&, T2&& t2) const noexcept(noexcept(THRUST_FWD(t2))) - -> decltype(THRUST_FWD(t2)) + _CCCL_HOST_DEVICE constexpr auto operator()(T1&&, T2&& t2) const + noexcept(noexcept(THRUST_FWD(t2))) -> decltype(THRUST_FWD(t2)) { return THRUST_FWD(t2); } @@ -1549,7 +1549,7 @@ _CCCL_SUPPRESS_DEPRECATED_PUSH */ template _CCCL_HOST_DEVICE - THRUST_DEPRECATED_BECAUSE("Use thrust::not_fn instead") unary_negate not1(const Predicate& pred); +THRUST_DEPRECATED_BECAUSE("Use thrust::not_fn instead") unary_negate not1(const Predicate& pred); _CCCL_SUPPRESS_DEPRECATED_POP /*! \p binary_negate is a function object adaptor: it is an Adaptable Binary @@ -1624,15 +1624,15 @@ struct not_fun_t F f; template - _CCCL_HOST_DEVICE auto operator()(Ts&&... args) noexcept(noexcept(!f(std::forward(args)...))) - -> decltype(!f(std::forward(args)...)) + _CCCL_HOST_DEVICE auto + operator()(Ts&&... args) noexcept(noexcept(!f(std::forward(args)...))) -> decltype(!f(std::forward(args)...)) { return !f(std::forward(args)...); } template - _CCCL_HOST_DEVICE auto operator()(Ts&&... args) const noexcept(noexcept(!f(std::forward(args)...))) - -> decltype(!f(std::forward(args)...)) + _CCCL_HOST_DEVICE auto operator()(Ts&&... args) const + noexcept(noexcept(!f(std::forward(args)...))) -> decltype(!f(std::forward(args)...)) { return !f(std::forward(args)...); } diff --git a/thrust/thrust/iterator/detail/retag.h b/thrust/thrust/iterator/detail/retag.h index eb053afdb9..6d3404261b 100644 --- a/thrust/thrust/iterator/detail/retag.h +++ b/thrust/thrust/iterator/detail/retag.h @@ -78,10 +78,10 @@ reinterpret_tag(thrust::detail::tagged_iterator iter) template _CCCL_HOST_DEVICE - typename thrust::detail::enable_if_retaggable::type, - Tag, - thrust::detail::tagged_iterator>::type - retag(Iterator iter) +typename thrust::detail::enable_if_retaggable::type, + Tag, + thrust::detail::tagged_iterator>::type +retag(Iterator iter) { return reinterpret_tag(iter); } // end retag() @@ -106,8 +106,8 @@ retag(thrust::pointer ptr) // avoid deeply-nested tagged_iterator template _CCCL_HOST_DEVICE - typename thrust::detail::enable_if_retaggable>::type - retag(thrust::detail::tagged_iterator iter) +typename thrust::detail::enable_if_retaggable>::type +retag(thrust::detail::tagged_iterator iter) { return reinterpret_tag(iter); } // end retag() diff --git a/thrust/thrust/iterator/iterator_facade.h b/thrust/thrust/iterator/iterator_facade.h index 50b51defe4..d4bfa73171 100644 --- a/thrust/thrust/iterator/iterator_facade.h +++ b/thrust/thrust/iterator/iterator_facade.h @@ -464,7 +464,8 @@ template -inline _CCCL_HOST_DEVICE +inline + _CCCL_HOST_DEVICE // XXX it might be nice to implement this at some point // typename enable_if_interoperable::type // exposition bool @@ -486,7 +487,8 @@ template -inline _CCCL_HOST_DEVICE +inline + _CCCL_HOST_DEVICE // XXX it might be nice to implement this at some point // typename enable_if_interoperable::type // exposition bool @@ -508,7 +510,8 @@ template -inline _CCCL_HOST_DEVICE +inline + _CCCL_HOST_DEVICE // XXX it might be nice to implement this at some point // typename enable_if_interoperable::type // exposition bool @@ -531,7 +534,8 @@ template -inline _CCCL_HOST_DEVICE +inline + _CCCL_HOST_DEVICE // XXX it might be nice to implement this at some point // typename enable_if_interoperable::type // exposition bool @@ -554,7 +558,8 @@ template -inline _CCCL_HOST_DEVICE +inline + _CCCL_HOST_DEVICE // XXX it might be nice to implement this at some point // typename enable_if_interoperable::type // exposition bool @@ -577,7 +582,8 @@ template -inline _CCCL_HOST_DEVICE +inline + _CCCL_HOST_DEVICE // XXX it might be nice to implement this at some point // typename enable_if_interoperable::type // exposition bool @@ -603,13 +609,13 @@ template inline _CCCL_HOST_DEVICE - // divine the type this operator returns - typename thrust::detail::distance_from_result< - iterator_facade, - iterator_facade>::type +// divine the type this operator returns +typename thrust::detail::distance_from_result< + iterator_facade, + iterator_facade>::type - operator-(iterator_facade const& lhs, - iterator_facade const& rhs) +operator-(iterator_facade const& lhs, + iterator_facade const& rhs) { return iterator_core_access ::distance_from(static_cast(lhs), static_cast(rhs)); } diff --git a/thrust/thrust/memory.h b/thrust/thrust/memory.h index e7cce2bacf..6462545590 100644 --- a/thrust/thrust/memory.h +++ b/thrust/thrust/memory.h @@ -267,9 +267,9 @@ malloc(const thrust::detail::execution_policy_base& system, std:: */ template _CCCL_HOST_DEVICE - thrust::pair, typename thrust::pointer::difference_type> - get_temporary_buffer(const thrust::detail::execution_policy_base& system, - typename thrust::pointer::difference_type n); +thrust::pair, typename thrust::pointer::difference_type> +get_temporary_buffer(const thrust::detail::execution_policy_base& system, + typename thrust::pointer::difference_type n); /*! \p free deallocates the storage previously allocated by \p thrust::malloc. * diff --git a/thrust/thrust/optional.h b/thrust/thrust/optional.h index ff2d3a7ac9..a94e2b9552 100644 --- a/thrust/thrust/optional.h +++ b/thrust/thrust/optional.h @@ -152,18 +152,16 @@ template < # endif typename = enable_if_t>::value>, int = 0> -_CCCL_HOST_DEVICE constexpr auto -invoke(Fn&& f, Args&&... args) noexcept(noexcept(std::mem_fn(f)(std::forward(args)...))) - -> decltype(std::mem_fn(f)(std::forward(args)...)) +_CCCL_HOST_DEVICE constexpr auto invoke(Fn&& f, Args&&... args) noexcept( + noexcept(std::mem_fn(f)(std::forward(args)...))) -> decltype(std::mem_fn(f)(std::forward(args)...)) { return std::mem_fn(f)(std::forward(args)...); } _CCCL_EXEC_CHECK_DISABLE template >::value>> -_CCCL_HOST_DEVICE constexpr auto -invoke(Fn&& f, Args&&... args) noexcept(noexcept(std::forward(f)(std::forward(args)...))) - -> decltype(std::forward(f)(std::forward(args)...)) +_CCCL_HOST_DEVICE constexpr auto invoke(Fn&& f, Args&&... args) noexcept(noexcept( + std::forward(f)(std::forward(args)...))) -> decltype(std::forward(f)(std::forward(args)...)) { return std::forward(f)(std::forward(args)...); } @@ -959,8 +957,8 @@ class optional _CCCL_EXEC_CHECK_DISABLE template _CCCL_HOST_DEVICE - THRUST_OPTIONAL_CPP11_CONSTEXPR decltype(optional_map_impl(std::declval(), std::declval())) - map(F&& f) & + THRUST_OPTIONAL_CPP11_CONSTEXPR decltype(optional_map_impl(std::declval(), std::declval())) + map(F&& f) & { return optional_map_impl(*this, std::forward(f)); } @@ -970,8 +968,8 @@ class optional _CCCL_EXEC_CHECK_DISABLE template _CCCL_HOST_DEVICE - THRUST_OPTIONAL_CPP11_CONSTEXPR decltype(optional_map_impl(std::declval(), std::declval())) - map(F&& f) && + THRUST_OPTIONAL_CPP11_CONSTEXPR decltype(optional_map_impl(std::declval(), std::declval())) + map(F&& f) && { return optional_map_impl(std::move(*this), std::forward(f)); } @@ -2250,8 +2248,8 @@ class optional _CCCL_EXEC_CHECK_DISABLE template _CCCL_HOST_DEVICE - THRUST_OPTIONAL_CPP11_CONSTEXPR decltype(detail::optional_map_impl(std::declval(), std::declval())) - map(F&& f) & + THRUST_OPTIONAL_CPP11_CONSTEXPR decltype(detail::optional_map_impl(std::declval(), std::declval())) + map(F&& f) & { return detail::optional_map_impl(*this, std::forward(f)); } @@ -2261,8 +2259,8 @@ class optional _CCCL_EXEC_CHECK_DISABLE template _CCCL_HOST_DEVICE - THRUST_OPTIONAL_CPP11_CONSTEXPR decltype(detail::optional_map_impl(std::declval(), std::declval())) - map(F&& f) && + THRUST_OPTIONAL_CPP11_CONSTEXPR decltype(detail::optional_map_impl(std::declval(), std::declval())) + map(F&& f) && { return detail::optional_map_impl(std::move(*this), std::forward(f)); } diff --git a/thrust/thrust/pair.h b/thrust/thrust/pair.h index 53d5cc93ed..0e567a35b6 100644 --- a/thrust/thrust/pair.h +++ b/thrust/thrust/pair.h @@ -99,17 +99,17 @@ _CCCL_HOST_DEVICE pair(_T1, _T2) -> pair<_T1, _T2>; template inline _CCCL_HOST_DEVICE - _CUDA_VSTD::__enable_if_t<_CUDA_VSTD::__is_swappable::value && _CUDA_VSTD::__is_swappable::value, void> - swap(pair& lhs, pair& rhs) noexcept( - (_CUDA_VSTD::__is_nothrow_swappable::value && _CUDA_VSTD::__is_nothrow_swappable::value)) +_CUDA_VSTD::__enable_if_t<_CUDA_VSTD::__is_swappable::value && _CUDA_VSTD::__is_swappable::value, void> +swap(pair& lhs, pair& rhs) noexcept( + (_CUDA_VSTD::__is_nothrow_swappable::value && _CUDA_VSTD::__is_nothrow_swappable::value)) { lhs.swap(rhs); } template inline _CCCL_HOST_DEVICE - pair::type, typename _CUDA_VSTD::__unwrap_ref_decay::type> - make_pair(T1&& t1, T2&& t2) +pair::type, typename _CUDA_VSTD::__unwrap_ref_decay::type> +make_pair(T1&& t1, T2&& t2) { return pair::type, typename _CUDA_VSTD::__unwrap_ref_decay::type>( _CUDA_VSTD::forward(t1), _CUDA_VSTD::forward(t2)); diff --git a/thrust/thrust/system/cuda/detail/cross_system.h b/thrust/thrust/system/cuda/detail/cross_system.h index de2af4d4c3..6a7009591f 100644 --- a/thrust/thrust/system/cuda/detail/cross_system.h +++ b/thrust/thrust/system/cuda/detail/cross_system.h @@ -87,18 +87,19 @@ direction_of_copy(thrust::system::cuda::execution_policy const&, thrust::c THRUST_DECLTYPE_RETURNS(thrust::detail::integral_constant{}) template - constexpr _CCCL_HOST_DEVICE auto direction_of_copy(execution_policy> const& systems) - THRUST_DECLTYPE_RETURNS( - direction_of_copy(derived_cast(derived_cast(systems).sys1), derived_cast(derived_cast(systems).sys2))) - - template (), std::declval()))> - constexpr _CCCL_HOST_DEVICE thrust::detail:: - integral_constant is_device_to_host_copy( - ExecutionPolicy0 const& exec0, ExecutionPolicy1 const& exec1) noexcept + constexpr + _CCCL_HOST_DEVICE auto direction_of_copy(execution_policy> const& systems) + THRUST_DECLTYPE_RETURNS( + direction_of_copy(derived_cast(derived_cast(systems).sys1), derived_cast(derived_cast(systems).sys2))) + + template (), std::declval()))> + constexpr _CCCL_HOST_DEVICE thrust::detail:: + integral_constant is_device_to_host_copy( + ExecutionPolicy0 const& exec0, ExecutionPolicy1 const& exec1) noexcept { return {}; } diff --git a/thrust/thrust/system/cuda/detail/future.inl b/thrust/thrust/system/cuda/detail/future.inl index 793af3c72d..fb97838ca8 100644 --- a/thrust/thrust/system/cuda/detail/future.inl +++ b/thrust/thrust/system/cuda/detail/future.inl @@ -675,8 +675,8 @@ public: {} _CCCL_HOST - // NOTE: We take `new_stream_t` by `const&` because it is incomplete here. - explicit unique_eager_event(new_stream_t const&) + // NOTE: We take `new_stream_t` by `const&` because it is incomplete here. + explicit unique_eager_event(new_stream_t const&) : device_(0) , async_signal_(new detail::async_signal(detail::unique_stream{})) { @@ -779,8 +779,8 @@ public: unique_eager_future& operator=(unique_eager_future const&) = delete; _CCCL_HOST - // NOTE: We take `new_stream_t` by `const&` because it is incomplete here. - explicit unique_eager_future(new_stream_t const&) + // NOTE: We take `new_stream_t` by `const&` because it is incomplete here. + explicit unique_eager_future(new_stream_t const&) : device_(0) , async_signal_(new detail::async_value(detail::unique_stream{})) { diff --git a/thrust/thrust/system/cuda/detail/par.h b/thrust/thrust/system/cuda/detail/par.h index 5803f7afb0..5541ca6007 100644 --- a/thrust/thrust/system/cuda/detail/par.h +++ b/thrust/thrust/system/cuda/detail/par.h @@ -105,9 +105,9 @@ struct execute_on_stream : execute_on_stream_base using base_t = execute_on_stream_base; _CCCL_HOST_DEVICE execute_on_stream() - : base_t(){}; + : base_t() {}; _CCCL_HOST_DEVICE execute_on_stream(cudaStream_t stream) - : base_t(stream){}; + : base_t(stream) {}; }; struct execute_on_stream_nosync : execute_on_stream_nosync_base @@ -115,9 +115,9 @@ struct execute_on_stream_nosync : execute_on_stream_nosync_base; _CCCL_HOST_DEVICE execute_on_stream_nosync() - : base_t(){}; + : base_t() {}; _CCCL_HOST_DEVICE execute_on_stream_nosync(cudaStream_t stream) - : base_t(stream){}; + : base_t(stream) {}; }; struct par_t diff --git a/thrust/thrust/system/cuda/detail/reduce_by_key.h b/thrust/thrust/system/cuda/detail/reduce_by_key.h index 3ac6f4bf5e..d5ec566e8d 100644 --- a/thrust/thrust/system/cuda/detail/reduce_by_key.h +++ b/thrust/thrust/system/cuda/detail/reduce_by_key.h @@ -152,10 +152,10 @@ struct Tuning : Tuning (MAX_INPUT_BYTES <= 8) ? 6 : mpl::min< - int, - NOMINAL_4B_ITEMS_PER_THREAD, - mpl::max:: - value>::value, + int, + NOMINAL_4B_ITEMS_PER_THREAD, + mpl::max:: + value>::value, }; using type = @@ -176,10 +176,10 @@ struct Tuning : Tuning (MAX_INPUT_BYTES <= 8) ? 9 : mpl::min< - int, - NOMINAL_4B_ITEMS_PER_THREAD, - mpl::max:: - value>::value, + int, + NOMINAL_4B_ITEMS_PER_THREAD, + mpl::max:: + value>::value, }; using type = diff --git a/thrust/thrust/system/detail/generic/select_system.h b/thrust/thrust/system/detail/generic/select_system.h index b07089c292..d4884a3630 100644 --- a/thrust/thrust/system/detail/generic/select_system.h +++ b/thrust/thrust/system/detail/generic/select_system.h @@ -68,20 +68,20 @@ select_system(thrust::execution_policy& system1, thrust::execution_poli template _CCCL_HOST_DEVICE - typename thrust::detail::lazy_disable_if::value, - thrust::detail::minimum_system>::type& - select_system(thrust::execution_policy& system1, - thrust::execution_policy& system2, - thrust::execution_policy& system3); +typename thrust::detail::lazy_disable_if::value, + thrust::detail::minimum_system>::type& +select_system(thrust::execution_policy& system1, + thrust::execution_policy& system2, + thrust::execution_policy& system3); template _CCCL_HOST_DEVICE - typename thrust::detail::lazy_disable_if::value, - thrust::detail::minimum_system>::type& - select_system(thrust::execution_policy& system1, - thrust::execution_policy& system2, - thrust::execution_policy& system3, - thrust::execution_policy& system4); +typename thrust::detail::lazy_disable_if::value, + thrust::detail::minimum_system>::type& +select_system(thrust::execution_policy& system1, + thrust::execution_policy& system2, + thrust::execution_policy& system3, + thrust::execution_policy& system4); template _CCCL_HOST_DEVICE typename thrust::detail::lazy_disable_if< diff --git a/thrust/thrust/system/detail/generic/select_system.inl b/thrust/thrust/system/detail/generic/select_system.inl index 06459a03a1..29f9b0bd1a 100644 --- a/thrust/thrust/system/detail/generic/select_system.inl +++ b/thrust/thrust/system/detail/generic/select_system.inl @@ -84,23 +84,23 @@ select_system(thrust::execution_policy& system1, thrust::execution_poli template _CCCL_HOST_DEVICE - typename thrust::detail::lazy_disable_if::value, - thrust::detail::minimum_system>::type& - select_system(thrust::execution_policy& system1, - thrust::execution_policy& system2, - thrust::execution_policy& system3) +typename thrust::detail::lazy_disable_if::value, + thrust::detail::minimum_system>::type& +select_system(thrust::execution_policy& system1, + thrust::execution_policy& system2, + thrust::execution_policy& system3) { return select_system(select_system(system1, system2), system3); } // end select_system() template _CCCL_HOST_DEVICE - typename thrust::detail::lazy_disable_if::value, - thrust::detail::minimum_system>::type& - select_system(thrust::execution_policy& system1, - thrust::execution_policy& system2, - thrust::execution_policy& system3, - thrust::execution_policy& system4) +typename thrust::detail::lazy_disable_if::value, + thrust::detail::minimum_system>::type& +select_system(thrust::execution_policy& system1, + thrust::execution_policy& system2, + thrust::execution_policy& system3, + thrust::execution_policy& system4) { return select_system(select_system(system1, system2, system3), system4); } // end select_system() diff --git a/thrust/thrust/system/detail/generic/temporary_buffer.h b/thrust/thrust/system/detail/generic/temporary_buffer.h index 0e795d8a93..3e83c10614 100644 --- a/thrust/thrust/system/detail/generic/temporary_buffer.h +++ b/thrust/thrust/system/detail/generic/temporary_buffer.h @@ -39,9 +39,9 @@ namespace generic template _CCCL_HOST_DEVICE - thrust::pair, typename thrust::pointer::difference_type> - get_temporary_buffer(thrust::execution_policy& exec, - typename thrust::pointer::difference_type n); +thrust::pair, typename thrust::pointer::difference_type> +get_temporary_buffer(thrust::execution_policy& exec, + typename thrust::pointer::difference_type n); _CCCL_EXEC_CHECK_DISABLE template diff --git a/thrust/thrust/system/detail/generic/temporary_buffer.inl b/thrust/thrust/system/detail/generic/temporary_buffer.inl index 72699344c2..78553b83ae 100644 --- a/thrust/thrust/system/detail/generic/temporary_buffer.inl +++ b/thrust/thrust/system/detail/generic/temporary_buffer.inl @@ -40,9 +40,9 @@ namespace generic template _CCCL_HOST_DEVICE - thrust::pair, typename thrust::pointer::difference_type> - get_temporary_buffer(thrust::execution_policy& exec, - typename thrust::pointer::difference_type n) +thrust::pair, typename thrust::pointer::difference_type> +get_temporary_buffer(thrust::execution_policy& exec, + typename thrust::pointer::difference_type n) { thrust::pointer ptr = thrust::malloc(exec, n); diff --git a/thrust/thrust/system/detail/sequential/general_copy.h b/thrust/thrust/system/detail/sequential/general_copy.h index c44cbfb53d..69b7acaaf3 100644 --- a/thrust/thrust/system/detail/sequential/general_copy.h +++ b/thrust/thrust/system/detail/sequential/general_copy.h @@ -70,8 +70,8 @@ iter_assign(OutputIterator dst, InputIterator src) _CCCL_EXEC_CHECK_DISABLE template inline _CCCL_HOST_DEVICE - typename thrust::detail::disable_if::value>::type - iter_assign(OutputIterator dst, InputIterator src) +typename thrust::detail::disable_if::value>::type +iter_assign(OutputIterator dst, InputIterator src) { using value_type = typename thrust::iterator_value::type; diff --git a/thrust/thrust/tuple.h b/thrust/thrust/tuple.h index 701da426b3..1ff1031804 100644 --- a/thrust/thrust/tuple.h +++ b/thrust/thrust/tuple.h @@ -168,7 +168,7 @@ struct tuple : public _CUDA_VSTD::tuple _CUDA_VSTD::__enable_if_t<(tuple_size<_TupleOfIteratorReferences>::value == sizeof...(Ts)), int> = 0> _CCCL_HOST_DEVICE tuple(_TupleOfIteratorReferences&& tup) : tuple(_CUDA_VSTD::forward<_TupleOfIteratorReferences>(tup).template __to_tuple( - _CUDA_VSTD::__make_tuple_indices_t())) + _CUDA_VSTD::__make_tuple_indices_t())) {} _CCCL_EXEC_CHECK_DISABLE @@ -210,8 +210,8 @@ _CCCL_HOST_DEVICE tuple(pair) -> tuple; #endif // _CCCL_STD_VER >= 2017 template -inline _CCCL_HOST_DEVICE - _CUDA_VSTD::__enable_if_t<_CUDA_VSTD::__all<_CUDA_VSTD::__is_swappable::value...>::value, void> +inline + _CCCL_HOST_DEVICE _CUDA_VSTD::__enable_if_t<_CUDA_VSTD::__all<_CUDA_VSTD::__is_swappable::value...>::value, void> swap(tuple& __x, tuple& __y) noexcept((_CUDA_VSTD::__all<_CUDA_VSTD::__is_nothrow_swappable::value...>::value)) { diff --git a/thrust/thrust/type_traits/is_contiguous_iterator.h b/thrust/thrust/type_traits/is_contiguous_iterator.h index 2a0b38b807..26ef2020e6 100644 --- a/thrust/thrust/type_traits/is_contiguous_iterator.h +++ b/thrust/thrust/type_traits/is_contiguous_iterator.h @@ -229,8 +229,8 @@ using unwrap_contiguous_iterator_t = typename detail::contiguous_iterator_traits //! Converts a contiguous iterator to its underlying raw pointer. template -_CCCL_HOST_DEVICE auto unwrap_contiguous_iterator(ContiguousIterator it) - -> unwrap_contiguous_iterator_t +_CCCL_HOST_DEVICE auto +unwrap_contiguous_iterator(ContiguousIterator it) -> unwrap_contiguous_iterator_t { static_assert(thrust::is_contiguous_iterator::value, "unwrap_contiguous_iterator called with non-contiguous iterator.");