From 020fda89801b4080ff8b837b196b1623bdc0feff Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Wed, 13 Nov 2024 07:39:13 +0100 Subject: [PATCH] Disable execution checks for tuple (#2780) --- .../cuda/std/detail/libcxx/include/tuple | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/tuple b/libcudacxx/include/cuda/std/detail/libcxx/include/tuple index f8392629a4e..b434bcfa23b 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/tuple +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/tuple @@ -217,6 +217,7 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr __tuple_leaf_specialization __tuple_leaf_cho template ()> class __tuple_leaf; +_CCCL_EXEC_CHECK_DISABLE template _LIBCUDACXX_HIDE_FROM_ABI void swap(__tuple_leaf<_Ip, _Hp, _Ep>& __x, __tuple_leaf<_Ip, _Hp, _Ep>& __y) noexcept(__is_nothrow_swappable<_Hp>::value) @@ -240,25 +241,30 @@ class __tuple_leaf<_Ip, _Hp, __tuple_leaf_specialization::__default> } public: + _CCCL_EXEC_CHECK_DISABLE _LIBCUDACXX_HIDE_FROM_ABI constexpr __tuple_leaf() noexcept(_CCCL_TRAIT(is_nothrow_default_constructible, _Hp)) : __value_() {} + _CCCL_EXEC_CHECK_DISABLE _LIBCUDACXX_HIDE_FROM_ABI constexpr __tuple_leaf(__tuple_leaf_default_constructor_tag) noexcept( _CCCL_TRAIT(is_nothrow_default_constructible, _Hp)) : __value_() {} + _CCCL_EXEC_CHECK_DISABLE template _LIBCUDACXX_HIDE_FROM_ABI __tuple_leaf(integral_constant, const _Alloc&) : __value_() {} + _CCCL_EXEC_CHECK_DISABLE template _LIBCUDACXX_HIDE_FROM_ABI __tuple_leaf(integral_constant, const _Alloc& __a) : __value_(allocator_arg_t(), __a) {} + _CCCL_EXEC_CHECK_DISABLE template _LIBCUDACXX_HIDE_FROM_ABI __tuple_leaf(integral_constant, const _Alloc& __a) : __value_(__a) @@ -273,21 +279,25 @@ public: : __value_(_CUDA_VSTD::forward<_Tp>(__t)) {} + _CCCL_EXEC_CHECK_DISABLE template _LIBCUDACXX_HIDE_FROM_ABI explicit __tuple_leaf(integral_constant, const _Alloc&, _Tp&& __t) : __value_(_CUDA_VSTD::forward<_Tp>(__t)) {} + _CCCL_EXEC_CHECK_DISABLE template _LIBCUDACXX_HIDE_FROM_ABI explicit __tuple_leaf(integral_constant, const _Alloc& __a, _Tp&& __t) : __value_(allocator_arg_t(), __a, _CUDA_VSTD::forward<_Tp>(__t)) {} + _CCCL_EXEC_CHECK_DISABLE template _LIBCUDACXX_HIDE_FROM_ABI explicit __tuple_leaf(integral_constant, const _Alloc& __a, _Tp&& __t) : __value_(_CUDA_VSTD::forward<_Tp>(__t), __a) {} + _CCCL_EXEC_CHECK_DISABLE template _LIBCUDACXX_HIDE_FROM_ABI __tuple_leaf& operator=(_Tp&& __t) noexcept(_CCCL_TRAIT(is_nothrow_assignable, _Hp&, _Tp)) { @@ -327,6 +337,7 @@ class __tuple_leaf<_Ip, _Hp, __tuple_leaf_specialization::__synthesize_assignmen } public: + _CCCL_EXEC_CHECK_DISABLE _LIBCUDACXX_HIDE_FROM_ABI constexpr __tuple_leaf() noexcept(_CCCL_TRAIT(is_nothrow_default_constructible, _Hp)) : __value_() { @@ -346,6 +357,7 @@ public: "temporary whose lifetime has ended"); } + _CCCL_EXEC_CHECK_DISABLE template _LIBCUDACXX_HIDE_FROM_ABI explicit __tuple_leaf(integral_constant, const _Alloc&, _Tp&& __t) : __value_(_CUDA_VSTD::forward<_Tp>(__t)) @@ -355,20 +367,25 @@ public: "temporary whose lifetime has ended"); } - _CCCL_HIDE_FROM_ABI __tuple_leaf(const __tuple_leaf& __t) = default; - _CCCL_HIDE_FROM_ABI __tuple_leaf(__tuple_leaf&& __t) = default; + _CCCL_EXEC_CHECK_DISABLE + __tuple_leaf(const __tuple_leaf& __t) = default; + _CCCL_EXEC_CHECK_DISABLE + __tuple_leaf(__tuple_leaf&& __t) = default; + _CCCL_EXEC_CHECK_DISABLE _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 __tuple_leaf& operator=(const __tuple_leaf& __t) noexcept { __value_ = __t.__value_; return *this; } + _CCCL_EXEC_CHECK_DISABLE _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 __tuple_leaf& operator=(__tuple_leaf&& __t) noexcept { __value_ = _CUDA_VSTD::move(__t.__value_); return *this; } + _CCCL_EXEC_CHECK_DISABLE template _LIBCUDACXX_HIDE_FROM_ABI __tuple_leaf& operator=(_Tp&& __t) noexcept(_CCCL_TRAIT(is_nothrow_assignable, _Hp&, _Tp)) { @@ -396,22 +413,27 @@ template class __tuple_leaf<_Ip, _Hp, __tuple_leaf_specialization::__empty_non_final> : private _Hp { public: + _CCCL_EXEC_CHECK_DISABLE _LIBCUDACXX_HIDE_FROM_ABI constexpr __tuple_leaf() noexcept(is_nothrow_default_constructible<_Hp>::value) {} + _CCCL_EXEC_CHECK_DISABLE _LIBCUDACXX_HIDE_FROM_ABI constexpr __tuple_leaf(__tuple_leaf_default_constructor_tag) noexcept( _CCCL_TRAIT(is_nothrow_default_constructible, _Hp)) : _Hp() {} + _CCCL_EXEC_CHECK_DISABLE template _LIBCUDACXX_HIDE_FROM_ABI __tuple_leaf(integral_constant, const _Alloc&) {} + _CCCL_EXEC_CHECK_DISABLE template _LIBCUDACXX_HIDE_FROM_ABI __tuple_leaf(integral_constant, const _Alloc& __a) : _Hp(allocator_arg_t(), __a) {} + _CCCL_EXEC_CHECK_DISABLE template _LIBCUDACXX_HIDE_FROM_ABI __tuple_leaf(integral_constant, const _Alloc& __a) : _Hp(__a) @@ -426,16 +448,19 @@ public: : _Hp(_CUDA_VSTD::forward<_Tp>(__t)) {} + _CCCL_EXEC_CHECK_DISABLE template _LIBCUDACXX_HIDE_FROM_ABI explicit __tuple_leaf(integral_constant, const _Alloc&, _Tp&& __t) : _Hp(_CUDA_VSTD::forward<_Tp>(__t)) {} + _CCCL_EXEC_CHECK_DISABLE template _LIBCUDACXX_HIDE_FROM_ABI explicit __tuple_leaf(integral_constant, const _Alloc& __a, _Tp&& __t) : _Hp(allocator_arg_t(), __a, _CUDA_VSTD::forward<_Tp>(__t)) {} + _CCCL_EXEC_CHECK_DISABLE template _LIBCUDACXX_HIDE_FROM_ABI explicit __tuple_leaf(integral_constant, const _Alloc& __a, _Tp&& __t) : _Hp(_CUDA_VSTD::forward<_Tp>(__t), __a) @@ -456,6 +481,7 @@ public: return *this; } + _CCCL_EXEC_CHECK_DISABLE _LIBCUDACXX_HIDE_FROM_ABI int swap(__tuple_leaf& __t) noexcept(__is_nothrow_swappable<__tuple_leaf>::value) { _CUDA_VSTD::swap(*this, __t);