diff --git a/cudax/include/cuda/experimental/__async/stop_token.cuh b/cudax/include/cuda/experimental/__async/stop_token.cuh index 52ff380ad99..32aeb3ea63a 100644 --- a/cudax/include/cuda/experimental/__async/stop_token.cuh +++ b/cudax/include/cuda/experimental/__async/stop_token.cuh @@ -96,7 +96,7 @@ struct __spin_wait else { --__count_; - _CUDA_VSTD::__libcpp_thread_yield_processor(); + _CUDA_VSTD::__cccl_thread_yield_processor(); } } diff --git a/libcudacxx/include/cuda/__barrier/barrier_block_scope.h b/libcudacxx/include/cuda/__barrier/barrier_block_scope.h index 163aad61da1..e79165ae8d0 100644 --- a/libcudacxx/include/cuda/__barrier/barrier_block_scope.h +++ b/libcudacxx/include/cuda/__barrier/barrier_block_scope.h @@ -229,7 +229,7 @@ class barrier : public __blo ( int32_t __ready = 0; if (!__isClusterShared(&__barrier)) { - return _CUDA_VSTD::__libcpp_thread_poll_with_backoff( + return _CUDA_VSTD::__cccl_thread_poll_with_backoff( _CUDA_VSTD::__barrier_poll_tester_phase(this, _CUDA_VSTD::move(__token)), __nanosec); } else if (!__isShared(&__barrier)) { __trap(); } @@ -256,7 +256,7 @@ class barrier : public __blo ( bool __ready = 0; if (!__isShared(&__barrier)) { - return _CUDA_VSTD::__libcpp_thread_poll_with_backoff( + return _CUDA_VSTD::__cccl_thread_poll_with_backoff( _CUDA_VSTD::__barrier_poll_tester_phase(this, _CUDA_VSTD::move(__token)), __nanosec); } @@ -267,7 +267,7 @@ class barrier : public __blo } while (!__ready && __nanosec > (_CUDA_VSTD::chrono::high_resolution_clock::now() - __start)); return __ready;), NV_ANY_TARGET, - (return _CUDA_VSTD::__libcpp_thread_poll_with_backoff( + (return _CUDA_VSTD::__cccl_thread_poll_with_backoff( _CUDA_VSTD::__barrier_poll_tester_phase(this, _CUDA_VSTD::move(__token)), _CUDA_VSTD::chrono::nanoseconds(__nanosec));)) } @@ -331,7 +331,7 @@ class barrier : public __blo ( int32_t __ready = 0; if (!__isClusterShared(&__barrier)) { - return _CUDA_VSTD::__libcpp_thread_poll_with_backoff( + return _CUDA_VSTD::__cccl_thread_poll_with_backoff( _CUDA_VSTD::__barrier_poll_tester_parity(this, __phase_parity), __nanosec); } else if (!__isShared(&__barrier)) { __trap(); } @@ -359,7 +359,7 @@ class barrier : public __blo ( bool __ready = 0; if (!__isShared(&__barrier)) { - return _CUDA_VSTD::__libcpp_thread_poll_with_backoff( + return _CUDA_VSTD::__cccl_thread_poll_with_backoff( _CUDA_VSTD::__barrier_poll_tester_parity(this, __phase_parity), __nanosec); } @@ -371,20 +371,20 @@ class barrier : public __blo return __ready;), NV_ANY_TARGET, - (return _CUDA_VSTD::__libcpp_thread_poll_with_backoff( + (return _CUDA_VSTD::__cccl_thread_poll_with_backoff( _CUDA_VSTD::__barrier_poll_tester_parity(this, __phase_parity), __nanosec);)) } public: _LIBCUDACXX_HIDE_FROM_ABI void wait(arrival_token&& __phase) const { - _CUDA_VSTD::__libcpp_thread_poll_with_backoff( + _CUDA_VSTD::__cccl_thread_poll_with_backoff( _CUDA_VSTD::__barrier_poll_tester_phase(this, _CUDA_VSTD::move(__phase))); } _LIBCUDACXX_HIDE_FROM_ABI void wait_parity(bool __phase_parity) const { - _CUDA_VSTD::__libcpp_thread_poll_with_backoff( + _CUDA_VSTD::__cccl_thread_poll_with_backoff( _CUDA_VSTD::__barrier_poll_tester_parity(this, __phase_parity)); } diff --git a/libcudacxx/include/cuda/pipeline b/libcudacxx/include/cuda/pipeline index 564075e1827..d034c931644 100644 --- a/libcudacxx/include/cuda/pipeline +++ b/libcudacxx/include/cuda/pipeline @@ -296,7 +296,7 @@ public: _LIBCUDACXX_HIDE_FROM_ABI bool consumer_wait_for(const _CUDA_VSTD::chrono::duration<_Rep, _Period>& __duration) { barrier<_Scope>& __stage_barrier = __shared_state_get_stage(__tail)->__produced; - return _CUDA_VSTD::__libcpp_thread_poll_with_backoff( + return _CUDA_VSTD::__cccl_thread_poll_with_backoff( _CUDA_VSTD::__barrier_poll_tester_parity>(&__stage_barrier, __produced_phase_parity), _CUDA_VSTD::chrono::duration_cast<_CUDA_VSTD::chrono::nanoseconds>(__duration)); } diff --git a/libcudacxx/include/cuda/std/__algorithm/copy.h b/libcudacxx/include/cuda/std/__algorithm/copy.h index 2333a19a604..f4013d4ea73 100644 --- a/libcudacxx/include/cuda/std/__algorithm/copy.h +++ b/libcudacxx/include/cuda/std/__algorithm/copy.h @@ -54,7 +54,7 @@ _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 bool __dispatch_memmove(_Up* __r return false; #endif - if (__libcpp_is_constant_evaluated()) + if (_CUDA_VSTD::is_constant_evaluated()) { return false; } @@ -114,7 +114,7 @@ _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 pair<_Tp*, _Up*> __copy(_Tp* __f { return {__last, __result + __n}; } - if ((!__libcpp_is_constant_evaluated() && __first < __result) + if ((!_CUDA_VSTD::is_constant_evaluated() && __first < __result) || __constexpr_tail_overlap(__first, __result, __last)) { for (ptrdiff_t __i = __n; __i > 0; --__i) diff --git a/libcudacxx/include/cuda/std/__atomic/wait/notify_wait.h b/libcudacxx/include/cuda/std/__atomic/wait/notify_wait.h index b79b22adad6..1c4c23d959e 100644 --- a/libcudacxx/include/cuda/std/__atomic/wait/notify_wait.h +++ b/libcudacxx/include/cuda/std/__atomic/wait/notify_wait.h @@ -72,11 +72,11 @@ _LIBCUDACXX_HIDE_FROM_ABI void __atomic_wait( } if (__i < 12) { - _CUDA_VSTD::__libcpp_thread_yield_processor(); + _CUDA_VSTD::__cccl_thread_yield_processor(); } else { - _CUDA_VSTD::__libcpp_thread_yield(); + _CUDA_VSTD::__cccl_thread_yield(); } } while (__nonatomic_compare_equal(__atomic_load_dispatch(__a, __order, _Sco{}), __val)) diff --git a/libcudacxx/include/cuda/std/__atomic/wait/polling.h b/libcudacxx/include/cuda/std/__atomic/wait/polling.h index cbb1a73a4b8..54ba4a08948 100644 --- a/libcudacxx/include/cuda/std/__atomic/wait/polling.h +++ b/libcudacxx/include/cuda/std/__atomic/wait/polling.h @@ -53,7 +53,7 @@ template _CCCL_HOST_DEVICE void __atomic_try_wait_slow_fallback( _Tp const volatile* __a, __atomic_underlying_remove_cv_t<_Tp> __val, memory_order __order, _Sco) { - _CUDA_VSTD::__libcpp_thread_poll_with_backoff(__atomic_poll_tester<_Tp, _Sco>(__a, __val, __order)); + _CUDA_VSTD::__cccl_thread_poll_with_backoff(__atomic_poll_tester<_Tp, _Sco>(__a, __val, __order)); } _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__barrier/barrier.h b/libcudacxx/include/cuda/std/__barrier/barrier.h index 491998132a8..e17d4a2d111 100644 --- a/libcudacxx/include/cuda/std/__barrier/barrier.h +++ b/libcudacxx/include/cuda/std/__barrier/barrier.h @@ -192,12 +192,12 @@ class __barrier_base<__empty_completion, _Sco> } _LIBCUDACXX_HIDE_FROM_ABI void wait(arrival_token&& __phase) const { - _CUDA_VSTD::__libcpp_thread_poll_with_backoff( + _CUDA_VSTD::__cccl_thread_poll_with_backoff( __barrier_poll_tester_phase<__barrier_base>(this, _CUDA_VSTD::move(__phase))); } _LIBCUDACXX_HIDE_FROM_ABI void wait_parity(bool __parity) const { - _CUDA_VSTD::__libcpp_thread_poll_with_backoff(__barrier_poll_tester_parity<__barrier_base>(this, __parity)); + _CUDA_VSTD::__cccl_thread_poll_with_backoff(__barrier_poll_tester_parity<__barrier_base>(this, __parity)); } _LIBCUDACXX_HIDE_FROM_ABI void arrive_and_wait() { diff --git a/libcudacxx/include/cuda/std/__bit/clz.h b/libcudacxx/include/cuda/std/__bit/clz.h index 267f022737a..791db82ca7f 100644 --- a/libcudacxx/include/cuda/std/__bit/clz.h +++ b/libcudacxx/include/cuda/std/__bit/clz.h @@ -75,10 +75,10 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr int __constexpr_clz(uint64_t __x) noexcept # endif } -_LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_clz(uint32_t __x) noexcept +_LIBCUDACXX_HIDE_FROM_ABI constexpr int __cccl_clz(uint32_t __x) noexcept { # if _CCCL_STD_VER >= 2014 - if (!__libcpp_default_is_constant_evaluated()) + if (!__cccl_default_is_constant_evaluated()) { NV_IF_ELSE_TARGET(NV_IS_DEVICE, (return __clz(__x);), (return __builtin_clz(__x);)) } @@ -86,10 +86,10 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_clz(uint32_t __x) noexcept return __constexpr_clz(__x); } -_LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_clz(uint64_t __x) noexcept +_LIBCUDACXX_HIDE_FROM_ABI constexpr int __cccl_clz(uint64_t __x) noexcept { # if _CCCL_STD_VER >= 2014 - if (!__libcpp_default_is_constant_evaluated()) + if (!__cccl_default_is_constant_evaluated()) { NV_IF_ELSE_TARGET(NV_IS_DEVICE, (return __clzll(__x);), (return __builtin_clzll(__x);)) } @@ -100,10 +100,10 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_clz(uint64_t __x) noexcept #else // _CCCL_COMPILER(MSVC) // Precondition: __x != 0 -_LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_clz(uint32_t __x) +_LIBCUDACXX_HIDE_FROM_ABI constexpr int __cccl_clz(uint32_t __x) { # if !defined(__CUDA_ARCH__) - if (!__libcpp_default_is_constant_evaluated()) + if (!__cccl_default_is_constant_evaluated()) { unsigned long __where = 0; if (_BitScanReverse(&__where, __x)) @@ -117,10 +117,10 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_clz(uint32_t __x) return __binary_clz32(static_cast(__x), 0); } -_LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_clz(uint64_t __x) +_LIBCUDACXX_HIDE_FROM_ABI constexpr int __cccl_clz(uint64_t __x) { # if !defined(__CUDA_ARCH__) - if (!__libcpp_default_is_constant_evaluated()) + if (!__cccl_default_is_constant_evaluated()) { unsigned long __where = 0; # if defined(_LIBCUDACXX_HAS_BITSCAN64) diff --git a/libcudacxx/include/cuda/std/__bit/countl.h b/libcudacxx/include/cuda/std/__bit/countl.h index f15e14a5293..3642d17de09 100644 --- a/libcudacxx/include/cuda/std/__bit/countl.h +++ b/libcudacxx/include/cuda/std/__bit/countl.h @@ -38,14 +38,14 @@ template _LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t __countl_zero_dispatch(_Tp __t) noexcept { - return __libcpp_clz(static_cast(__t)) - (numeric_limits::digits - numeric_limits<_Tp>::digits); + return __cccl_clz(static_cast(__t)) - (numeric_limits::digits - numeric_limits<_Tp>::digits); } template _LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t __countl_zero_dispatch(_Tp __t) noexcept { - return __libcpp_clz(static_cast(__t)) - (numeric_limits::digits - numeric_limits<_Tp>::digits); + return __cccl_clz(static_cast(__t)) - (numeric_limits::digits - numeric_limits<_Tp>::digits); } template @@ -90,27 +90,26 @@ __countl_zero_dispatch(_Tp __t) noexcept template _LIBCUDACXX_HIDE_FROM_ABI constexpr int __countl_zero(_Tp __t) noexcept { - static_assert(__libcpp_is_unsigned_integer<_Tp>::value, "__countl_zero requires unsigned"); + static_assert(__cccl_is_unsigned_integer<_Tp>::value, "__countl_zero requires unsigned"); return __t ? __countl_zero_dispatch(__t) : numeric_limits<_Tp>::digits; } template _LIBCUDACXX_HIDE_FROM_ABI constexpr int __countl_one(_Tp __t) noexcept { - static_assert(__libcpp_is_unsigned_integer<_Tp>::value, "__countl_one requires unsigned"); + static_assert(__cccl_is_unsigned_integer<_Tp>::value, "__countl_one requires unsigned"); return __t != numeric_limits<_Tp>::max() ? __countl_zero(static_cast<_Tp>(~__t)) : numeric_limits<_Tp>::digits; } template -_LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, int> +_LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__cccl_is_unsigned_integer<_Tp>::value, int> countl_zero(_Tp __t) noexcept { return __countl_zero(__t); } template -_LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, int> -countl_one(_Tp __t) noexcept +_LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__cccl_is_unsigned_integer<_Tp>::value, int> countl_one(_Tp __t) noexcept { return __countl_one(__t); } diff --git a/libcudacxx/include/cuda/std/__bit/countr.h b/libcudacxx/include/cuda/std/__bit/countr.h index 21e65f800ba..e7a2b609abe 100644 --- a/libcudacxx/include/cuda/std/__bit/countr.h +++ b/libcudacxx/include/cuda/std/__bit/countr.h @@ -37,14 +37,14 @@ template _LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t __countr_zero_dispatch(_Tp __t) noexcept { - return __libcpp_ctz(static_cast(__t)); + return __cccl_ctz(static_cast(__t)); } template _LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t __countr_zero_dispatch(_Tp __t) noexcept { - return __libcpp_ctz(static_cast(__t)); + return __cccl_ctz(static_cast(__t)); } template @@ -83,7 +83,7 @@ __countr_zero_dispatch(_Tp __t) noexcept template _LIBCUDACXX_HIDE_FROM_ABI constexpr int __countr_zero(_Tp __t) noexcept { - static_assert(__libcpp_is_unsigned_integer<_Tp>::value, "__countr_zero requires unsigned"); + static_assert(__cccl_is_unsigned_integer<_Tp>::value, "__countr_zero requires unsigned"); return __t ? __countr_zero_dispatch(__t) : numeric_limits<_Tp>::digits; } @@ -91,20 +91,19 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr int __countr_zero(_Tp __t) noexcept template _LIBCUDACXX_HIDE_FROM_ABI constexpr int __countr_one(_Tp __t) noexcept { - static_assert(__libcpp_is_unsigned_integer<_Tp>::value, "__countr_one requires unsigned"); + static_assert(__cccl_is_unsigned_integer<_Tp>::value, "__countr_one requires unsigned"); return __t != numeric_limits<_Tp>::max() ? __countr_zero(static_cast<_Tp>(~__t)) : numeric_limits<_Tp>::digits; } template -_LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, int> +_LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__cccl_is_unsigned_integer<_Tp>::value, int> countr_zero(_Tp __t) noexcept { return __countr_zero(__t); } template -_LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, int> -countr_one(_Tp __t) noexcept +_LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__cccl_is_unsigned_integer<_Tp>::value, int> countr_one(_Tp __t) noexcept { return __countr_one(__t); } diff --git a/libcudacxx/include/cuda/std/__bit/ctz.h b/libcudacxx/include/cuda/std/__bit/ctz.h index 9d2e771bd61..813afa6be65 100644 --- a/libcudacxx/include/cuda/std/__bit/ctz.h +++ b/libcudacxx/include/cuda/std/__bit/ctz.h @@ -75,10 +75,10 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr int __constexpr_ctz(uint64_t __x) noexcept # endif } -_LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_ctz(uint32_t __x) noexcept +_LIBCUDACXX_HIDE_FROM_ABI constexpr int __cccl_ctz(uint32_t __x) noexcept { # if _CCCL_STD_VER >= 2014 - if (!__libcpp_default_is_constant_evaluated()) + if (!__cccl_default_is_constant_evaluated()) { NV_IF_ELSE_TARGET( NV_IS_DEVICE, (return (!__x) ? (sizeof(uint32_t) * 8) : (__ffs(__x) - 1);), (return __builtin_ctz(__x);)) @@ -87,10 +87,10 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_ctz(uint32_t __x) noexcept return __constexpr_ctz(__x); } -_LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_ctz(uint64_t __x) noexcept +_LIBCUDACXX_HIDE_FROM_ABI constexpr int __cccl_ctz(uint64_t __x) noexcept { # if _CCCL_STD_VER >= 2014 - if (!__libcpp_default_is_constant_evaluated()) + if (!__cccl_default_is_constant_evaluated()) { NV_IF_ELSE_TARGET( NV_IS_DEVICE, (return (!__x) ? (sizeof(uint64_t) * 8) : (__ffsll(__x) - 1);), (return __builtin_ctzll(__x);)) @@ -102,10 +102,10 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_ctz(uint64_t __x) noexcept #else // _CCCL_COMPILER(MSVC) // Precondition: __x != 0 -_LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_ctz(uint32_t __x) +_LIBCUDACXX_HIDE_FROM_ABI constexpr int __cccl_ctz(uint32_t __x) { # if !defined(__CUDA_ARCH__) - if (!__libcpp_default_is_constant_evaluated()) + if (!__cccl_default_is_constant_evaluated()) { unsigned long __where = 0; if (_BitScanForward(&__where, __x)) @@ -119,10 +119,10 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_ctz(uint32_t __x) return __binary_ctz32(static_cast(__x), 0); } -_LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_ctz(uint64_t __x) +_LIBCUDACXX_HIDE_FROM_ABI constexpr int __cccl_ctz(uint64_t __x) { # if !defined(__CUDA_ARCH__) - if (!__libcpp_default_is_constant_evaluated()) + if (!__cccl_default_is_constant_evaluated()) { unsigned long __where = 0; # if defined(_LIBCUDACXX_HAS_BITSCAN64) && (defined(_M_AMD64) || defined(__x86_64__)) diff --git a/libcudacxx/include/cuda/std/__bit/has_single_bit.h b/libcudacxx/include/cuda/std/__bit/has_single_bit.h index 1cd207f72bb..07586899549 100644 --- a/libcudacxx/include/cuda/std/__bit/has_single_bit.h +++ b/libcudacxx/include/cuda/std/__bit/has_single_bit.h @@ -29,12 +29,12 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template _LIBCUDACXX_HIDE_FROM_ABI constexpr bool __has_single_bit(_Tp __t) noexcept { - static_assert(__libcpp_is_unsigned_integer<_Tp>::value, "__has_single_bit requires unsigned"); + static_assert(__cccl_is_unsigned_integer<_Tp>::value, "__has_single_bit requires unsigned"); return __t != 0 && (((__t & (__t - 1)) == 0)); } template -_LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, bool> +_LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__cccl_is_unsigned_integer<_Tp>::value, bool> has_single_bit(_Tp __t) noexcept { return __has_single_bit(__t); diff --git a/libcudacxx/include/cuda/std/__bit/integral.h b/libcudacxx/include/cuda/std/__bit/integral.h index 869972f3422..f0186ad9f5f 100644 --- a/libcudacxx/include/cuda/std/__bit/integral.h +++ b/libcudacxx/include/cuda/std/__bit/integral.h @@ -32,7 +32,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template _LIBCUDACXX_HIDE_FROM_ABI constexpr uint32_t __bit_log2(_Tp __t) noexcept { - static_assert(__libcpp_is_unsigned_integer<_Tp>::value, "__bit_log2 requires unsigned"); + static_assert(__cccl_is_unsigned_integer<_Tp>::value, "__bit_log2 requires unsigned"); return numeric_limits<_Tp>::digits - 1 - __countl_zero(__t); } @@ -51,21 +51,19 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t -_LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, _Tp> -bit_floor(_Tp __t) noexcept +_LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__cccl_is_unsigned_integer<_Tp>::value, _Tp> bit_floor(_Tp __t) noexcept { return __t == 0 ? 0 : static_cast<_Tp>(_Tp{1} << __bit_log2(__t)); } template -_LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, _Tp> bit_ceil(_Tp __t) noexcept +_LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__cccl_is_unsigned_integer<_Tp>::value, _Tp> bit_ceil(_Tp __t) noexcept { return (__t < 2) ? 1 : static_cast<_Tp>(__ceil2(__t)); } template -_LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, int> -bit_width(_Tp __t) noexcept +_LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__cccl_is_unsigned_integer<_Tp>::value, int> bit_width(_Tp __t) noexcept { return __t == 0 ? 0 : static_cast(__bit_log2(__t) + 1); } diff --git a/libcudacxx/include/cuda/std/__bit/popc.h b/libcudacxx/include/cuda/std/__bit/popc.h index dc22999b985..6a1cb93239f 100644 --- a/libcudacxx/include/cuda/std/__bit/popc.h +++ b/libcudacxx/include/cuda/std/__bit/popc.h @@ -76,10 +76,10 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr int __constexpr_popcount(uint64_t __x) noexc # endif } -_LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_popc(uint32_t __x) noexcept +_LIBCUDACXX_HIDE_FROM_ABI constexpr int __cccl_popc(uint32_t __x) noexcept { # if _CCCL_STD_VER >= 2014 - if (!__libcpp_default_is_constant_evaluated()) + if (!__cccl_default_is_constant_evaluated()) { NV_IF_ELSE_TARGET(NV_IS_DEVICE, (return __popc(__x);), (return __builtin_popcount(__x);)) } @@ -87,10 +87,10 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_popc(uint32_t __x) noexcept return __constexpr_popcount(static_cast(__x)); } -_LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_popc(uint64_t __x) noexcept +_LIBCUDACXX_HIDE_FROM_ABI constexpr int __cccl_popc(uint64_t __x) noexcept { # if _CCCL_STD_VER >= 2014 - if (!__libcpp_default_is_constant_evaluated()) + if (!__cccl_default_is_constant_evaluated()) { NV_IF_ELSE_TARGET(NV_IS_DEVICE, (return __popcll(__x);), (return __builtin_popcountll(__x);)) } @@ -100,9 +100,9 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_popc(uint64_t __x) noexcept #else // _CCCL_COMPILER(MSVC) -_LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_popc(uint32_t __x) +_LIBCUDACXX_HIDE_FROM_ABI constexpr int __cccl_popc(uint32_t __x) { - if (!__libcpp_default_is_constant_evaluated()) + if (!__cccl_default_is_constant_evaluated()) { NV_IF_TARGET(NV_IS_HOST, (return static_cast(_LIBCUDACXX_MSVC_POPC(__x));)) } @@ -110,9 +110,9 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_popc(uint32_t __x) return __fallback_popc64(static_cast(__x)); } -_LIBCUDACXX_HIDE_FROM_ABI constexpr int __libcpp_popc(uint64_t __x) +_LIBCUDACXX_HIDE_FROM_ABI constexpr int __cccl_popc(uint64_t __x) { - if (!__libcpp_default_is_constant_evaluated()) + if (!__cccl_default_is_constant_evaluated()) { NV_IF_TARGET(NV_IS_HOST, (return static_cast(_LIBCUDACXX_MSVC_POPC64(__x));)) } diff --git a/libcudacxx/include/cuda/std/__bit/popcount.h b/libcudacxx/include/cuda/std/__bit/popcount.h index 5d4395cb457..18c8d97dd30 100644 --- a/libcudacxx/include/cuda/std/__bit/popcount.h +++ b/libcudacxx/include/cuda/std/__bit/popcount.h @@ -33,14 +33,14 @@ template _LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t __popcount_dispatch(_Tp __t) noexcept { - return __libcpp_popc(static_cast(__t)); + return __cccl_popc(static_cast(__t)); } template _LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t __popcount_dispatch(_Tp __t) noexcept { - return __libcpp_popc(static_cast(__t)); + return __cccl_popc(static_cast(__t)); } template @@ -49,7 +49,7 @@ struct __popcount_rsh_impl static _LIBCUDACXX_HIDE_FROM_ABI constexpr int __count(_Tp __t) { return __popcount_rsh_impl<_Tp, _St - 1>::__count(__t >> numeric_limits::digits) - + __libcpp_popc(static_cast(__t)); + + __cccl_popc(static_cast(__t)); } }; @@ -58,7 +58,7 @@ struct __popcount_rsh_impl<_Tp, 1> { static _LIBCUDACXX_HIDE_FROM_ABI constexpr int __count(_Tp __t) { - return __libcpp_popc(static_cast(__t)); + return __cccl_popc(static_cast(__t)); } }; @@ -72,13 +72,13 @@ __popcount_dispatch(_Tp __t) noexcept template _LIBCUDACXX_HIDE_FROM_ABI constexpr int __popcount(_Tp __t) noexcept { - static_assert(__libcpp_is_unsigned_integer<_Tp>::value, "__libcpp_popcount requires unsigned"); + static_assert(__cccl_is_unsigned_integer<_Tp>::value, "__cccl_popcount requires unsigned"); return __popcount_dispatch(__t); } template -_LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, int> popcount(_Tp __t) noexcept +_LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__cccl_is_unsigned_integer<_Tp>::value, int> popcount(_Tp __t) noexcept { return __popcount(__t); } diff --git a/libcudacxx/include/cuda/std/__bit/reference.h b/libcudacxx/include/cuda/std/__bit/reference.h index d4c7320a701..12acac014b1 100644 --- a/libcudacxx/include/cuda/std/__bit/reference.h +++ b/libcudacxx/include/cuda/std/__bit/reference.h @@ -109,7 +109,7 @@ class __bit_reference } _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 __bit_iterator<_Cp, false> operator&() const noexcept { - return __bit_iterator<_Cp, false>(__seg_, static_cast(_CUDA_VSTD::__libcpp_ctz(__mask_))); + return __bit_iterator<_Cp, false>(__seg_, static_cast(_CUDA_VSTD::__cccl_ctz(__mask_))); } friend _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 void @@ -180,7 +180,7 @@ class __bit_const_reference _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 __bit_iterator<_Cp, true> operator&() const noexcept { - return __bit_iterator<_Cp, true>(__seg_, static_cast(_CUDA_VSTD::__libcpp_ctz(__mask_))); + return __bit_iterator<_Cp, true>(__seg_, static_cast(_CUDA_VSTD::__cccl_ctz(__mask_))); } private: @@ -812,7 +812,7 @@ struct __bit_array _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 explicit __bit_array(difference_type __s) : __size_(__s) { - if (__libcpp_is_constant_evaluated()) + if (_CUDA_VSTD::is_constant_evaluated()) { for (size_t __i = 0; __i != __bit_array<_Cp>::_Np; ++__i) { diff --git a/libcudacxx/include/cuda/std/__bit/rotate.h b/libcudacxx/include/cuda/std/__bit/rotate.h index 0d5d7652a91..bf2c2e5f61a 100644 --- a/libcudacxx/include/cuda/std/__bit/rotate.h +++ b/libcudacxx/include/cuda/std/__bit/rotate.h @@ -30,7 +30,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp __rotl(_Tp __t, unsigned int __cnt) noexcept { - static_assert(__libcpp_is_unsigned_integer<_Tp>::value, "__rotl requires unsigned"); + static_assert(__cccl_is_unsigned_integer<_Tp>::value, "__rotl requires unsigned"); using __nlt = numeric_limits<_Tp>; return ((__cnt % __nlt::digits) == 0) @@ -41,7 +41,7 @@ _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp __rotl(_Tp __t, unsigned template _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp __rotr(_Tp __t, unsigned int __cnt) noexcept { - static_assert(__libcpp_is_unsigned_integer<_Tp>::value, "__rotr requires unsigned"); + static_assert(__cccl_is_unsigned_integer<_Tp>::value, "__rotr requires unsigned"); using __nlt = numeric_limits<_Tp>; return ((__cnt % __nlt::digits) == 0) @@ -50,7 +50,7 @@ _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp __rotr(_Tp __t, unsigned } template -_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, _Tp> +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__cccl_is_unsigned_integer<_Tp>::value, _Tp> rotl(_Tp __t, unsigned int __cnt) noexcept { return __rotl(__t, __cnt); @@ -58,7 +58,7 @@ rotl(_Tp __t, unsigned int __cnt) noexcept // rotr template -_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__libcpp_is_unsigned_integer<_Tp>::value, _Tp> +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr enable_if_t<__cccl_is_unsigned_integer<_Tp>::value, _Tp> rotr(_Tp __t, unsigned int __cnt) noexcept { return __rotr(__t, __cnt); diff --git a/libcudacxx/include/cuda/std/__complex/nvbf16.h b/libcudacxx/include/cuda/std/__complex/nvbf16.h index ede7f05a29a..0167f952141 100644 --- a/libcudacxx/include/cuda/std/__complex/nvbf16.h +++ b/libcudacxx/include/cuda/std/__complex/nvbf16.h @@ -83,7 +83,7 @@ struct __type_to_vector<__nv_bfloat16> }; template <> -struct __libcpp_complex_overload_traits<__nv_bfloat16, false, false> +struct __cccl_complex_overload_traits<__nv_bfloat16, false, false> { typedef __nv_bfloat16 _ValueType; typedef complex<__nv_bfloat16> _ComplexType; diff --git a/libcudacxx/include/cuda/std/__complex/nvfp16.h b/libcudacxx/include/cuda/std/__complex/nvfp16.h index 11406f98588..8ddd2b27747 100644 --- a/libcudacxx/include/cuda/std/__complex/nvfp16.h +++ b/libcudacxx/include/cuda/std/__complex/nvfp16.h @@ -80,7 +80,7 @@ struct __type_to_vector<__half> }; template <> -struct __libcpp_complex_overload_traits<__half, false, false> +struct __cccl_complex_overload_traits<__half, false, false> { typedef __half _ValueType; typedef complex<__half> _ComplexType; diff --git a/libcudacxx/include/cuda/std/__concepts/arithmetic.h b/libcudacxx/include/cuda/std/__concepts/arithmetic.h index 5a643652824..cd909548745 100644 --- a/libcudacxx/include/cuda/std/__concepts/arithmetic.h +++ b/libcudacxx/include/cuda/std/__concepts/arithmetic.h @@ -47,7 +47,7 @@ template _CCCL_CONCEPT floating_point = _CCCL_TRAIT(is_floating_point, _Tp); template -_CCCL_CONCEPT __libcpp_signed_integer = __libcpp_is_signed_integer<_Tp>::value; +_CCCL_CONCEPT __cccl_signed_integer = __cccl_is_signed_integer<_Tp>::value; #endif // ^^^ !_CCCL_NO_VARIABLE_TEMPLATES diff --git a/libcudacxx/include/cuda/std/__iterator/erase_if_container.h b/libcudacxx/include/cuda/std/__iterator/erase_if_container.h index 2d2b6e35767..e4573dc187b 100644 --- a/libcudacxx/include/cuda/std/__iterator/erase_if_container.h +++ b/libcudacxx/include/cuda/std/__iterator/erase_if_container.h @@ -24,7 +24,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -_LIBCUDACXX_HIDE_FROM_ABI typename _Container::size_type __libcpp_erase_if_container(_Container& __c, _Predicate& __pred) +_LIBCUDACXX_HIDE_FROM_ABI typename _Container::size_type __cccl_erase_if_container(_Container& __c, _Predicate& __pred) { typename _Container::size_type __old_size = __c.size(); diff --git a/libcudacxx/include/cuda/std/__memory/allocator.h b/libcudacxx/include/cuda/std/__memory/allocator.h index e57725955ae..2fe10179399 100644 --- a/libcudacxx/include/cuda/std/__memory/allocator.h +++ b/libcudacxx/include/cuda/std/__memory/allocator.h @@ -129,13 +129,13 @@ class _CCCL_TYPE_VISIBILITY_DEFAULT allocator : private __non_trivial_if{}.allocate(__n); } #endif // _CCCL_HAS_CONSTEXPR_ALLOCATION { - return static_cast<_Tp*>(_CUDA_VSTD::__libcpp_allocate(__n * sizeof(_Tp), _LIBCUDACXX_ALIGNOF(_Tp))); + return static_cast<_Tp*>(_CUDA_VSTD::__cccl_allocate(__n * sizeof(_Tp), _LIBCUDACXX_ALIGNOF(_Tp))); } } @@ -150,14 +150,14 @@ class _CCCL_TYPE_VISIBILITY_DEFAULT allocator : private __non_trivial_if{}.deallocate(__p, __n); } else #endif // _CCCL_STD_VER >= 2020 { - _CUDA_VSTD::__libcpp_deallocate((void*) __p, __n * sizeof(_Tp), _LIBCUDACXX_ALIGNOF(_Tp)); + _CUDA_VSTD::__cccl_deallocate((void*) __p, __n * sizeof(_Tp), _LIBCUDACXX_ALIGNOF(_Tp)); } } @@ -231,13 +231,13 @@ class _CCCL_TYPE_VISIBILITY_DEFAULT allocator { __throw_bad_array_new_length(); } - if (__libcpp_is_constant_evaluated()) + if (_CUDA_VSTD::is_constant_evaluated()) { return static_cast(::operator new(__n * sizeof(_Tp))); } else { - return static_cast(_CUDA_VSTD::__libcpp_allocate(__n * sizeof(_Tp), _LIBCUDACXX_ALIGNOF(_Tp))); + return static_cast(_CUDA_VSTD::__cccl_allocate(__n * sizeof(_Tp), _LIBCUDACXX_ALIGNOF(_Tp))); } } @@ -250,13 +250,13 @@ class _CCCL_TYPE_VISIBILITY_DEFAULT allocator _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX20 void deallocate(const _Tp* __p, size_t __n) noexcept { - if (__libcpp_is_constant_evaluated()) + if (_CUDA_VSTD::is_constant_evaluated()) { ::operator delete(const_cast<_Tp*>(__p)); } else { - _CUDA_VSTD::__libcpp_deallocate((void*) const_cast<_Tp*>(__p), __n * sizeof(_Tp), _LIBCUDACXX_ALIGNOF(_Tp)); + _CUDA_VSTD::__cccl_deallocate((void*) const_cast<_Tp*>(__p), __n * sizeof(_Tp), _LIBCUDACXX_ALIGNOF(_Tp)); } } diff --git a/libcudacxx/include/cuda/std/__memory/builtin_new_allocator.h b/libcudacxx/include/cuda/std/__memory/builtin_new_allocator.h index 03a45cac5a6..5752a48ec04 100644 --- a/libcudacxx/include/cuda/std/__memory/builtin_new_allocator.h +++ b/libcudacxx/include/cuda/std/__memory/builtin_new_allocator.h @@ -45,7 +45,7 @@ struct __builtin_new_allocator _LIBCUDACXX_HIDE_FROM_ABI void operator()(void* __p) const noexcept { - _CUDA_VSTD::__libcpp_deallocate(__p, __size_, __align_); + _CUDA_VSTD::__cccl_deallocate(__p, __size_, __align_); } private: @@ -57,12 +57,12 @@ struct __builtin_new_allocator _LIBCUDACXX_HIDE_FROM_ABI static __holder_t __allocate_bytes(size_t __s, size_t __align) { - return __holder_t(_CUDA_VSTD::__libcpp_allocate(__s, __align), __builtin_new_deleter(__s, __align)); + return __holder_t(_CUDA_VSTD::__cccl_allocate(__s, __align), __builtin_new_deleter(__s, __align)); } _LIBCUDACXX_HIDE_FROM_ABI static void __deallocate_bytes(void* __p, size_t __s, size_t __align) noexcept { - _CUDA_VSTD::__libcpp_deallocate(__p, __s, __align); + _CUDA_VSTD::__cccl_deallocate(__p, __s, __align); } template diff --git a/libcudacxx/include/cuda/std/__memory/construct_at.h b/libcudacxx/include/cuda/std/__memory/construct_at.h index 18300552e7e..aeb39a6bf18 100644 --- a/libcudacxx/include/cuda/std/__memory/construct_at.h +++ b/libcudacxx/include/cuda/std/__memory/construct_at.h @@ -114,7 +114,7 @@ construct_at(_Tp* __location, _Args&&... __args) { _CCCL_ASSERT(__location != nullptr, "null pointer given to construct_at"); // Need to go through `std::construct_at` as that is the explicitly blessed function - if (__libcpp_is_constant_evaluated()) + if (_CUDA_VSTD::is_constant_evaluated()) { return ::std::construct_at(__location, _CUDA_VSTD::forward<_Args>(__args)...); } @@ -131,7 +131,7 @@ construct_at(_Tp* __location, _Args&&... __args) { _CCCL_ASSERT(__location != nullptr, "null pointer given to construct_at"); // Need to go through `std::construct_at` as that is the explicitly blessed function - if (__libcpp_is_constant_evaluated()) + if (_CUDA_VSTD::is_constant_evaluated()) { return ::std::construct_at(__location, _CUDA_VSTD::forward<_Args>(__args)...); } @@ -150,7 +150,7 @@ __construct_at(_Tp* __location, _Args&&... __args) _CCCL_ASSERT(__location != nullptr, "null pointer given to construct_at"); #if _CCCL_STD_VER >= 2020 // Need to go through `std::construct_at` as that is the explicitly blessed function - if (__libcpp_is_constant_evaluated()) + if (_CUDA_VSTD::is_constant_evaluated()) { return ::std::construct_at(__location, _CUDA_VSTD::forward<_Args>(__args)...); } @@ -167,7 +167,7 @@ __construct_at(_Tp* __location, _Args&&... __args) _CCCL_ASSERT(__location != nullptr, "null pointer given to construct_at"); #if _CCCL_STD_VER >= 2020 // Need to go through `std::construct_at` as that is the explicitly blessed function - if (__libcpp_is_constant_evaluated()) + if (_CUDA_VSTD::is_constant_evaluated()) { return ::std::construct_at(__location, _CUDA_VSTD::forward<_Args>(__args)...); } diff --git a/libcudacxx/include/cuda/std/__memory/temporary_buffer.h b/libcudacxx/include/cuda/std/__memory/temporary_buffer.h index 37f64befac4..2aa33cad869 100644 --- a/libcudacxx/include/cuda/std/__memory/temporary_buffer.h +++ b/libcudacxx/include/cuda/std/__memory/temporary_buffer.h @@ -80,7 +80,7 @@ get_temporary_buffer(ptrdiff_t __n) noexcept template _LIBCUDACXX_HIDE_FROM_ABI void return_temporary_buffer(_Tp* __p) noexcept { - _CUDA_VSTD::__libcpp_deallocate_unsized((void*) __p, _LIBCUDACXX_ALIGNOF(_Tp)); + _CUDA_VSTD::__cccl_deallocate_unsized((void*) __p, _LIBCUDACXX_ALIGNOF(_Tp)); } _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__memory/uninitialized_algorithms.h b/libcudacxx/include/cuda/std/__memory/uninitialized_algorithms.h index a194efa5a02..11b476ba76c 100644 --- a/libcudacxx/include/cuda/std/__memory/uninitialized_algorithms.h +++ b/libcudacxx/include/cuda/std/__memory/uninitialized_algorithms.h @@ -349,7 +349,7 @@ __allocator_destroy_multidimensional(_Alloc& __alloc, _BidirIter __first, _Bidir _CCCL_IF_CONSTEXPR (_CCCL_TRAIT(is_array, _ValueType)) { - static_assert(!__libcpp_is_unbounded_array<_ValueType>::value, + static_assert(!__cccl_is_unbounded_array<_ValueType>::value, "arrays of unbounded arrays don't exist, but if they did we would mess up here"); using _Element = remove_extent_t<_ValueType>; @@ -576,7 +576,7 @@ template < _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX20 _Out* __uninitialized_allocator_copy_impl(_Alloc&, _In* __first1, _In* __last1, _Out* __first2) { - if (__libcpp_is_constant_evaluated()) + if (_CUDA_VSTD::is_constant_evaluated()) { while (__first1 != __last1) { @@ -650,7 +650,7 @@ template -_LIBCUDACXX_HIDE_FROM_ABI void* __libcpp_operator_new(_Args... __args) +_LIBCUDACXX_HIDE_FROM_ABI void* __cccl_operator_new(_Args... __args) { // Those builtins are not usable on device and the tests crash when using them #if defined(_CCCL_BUILTIN_OPERATOR_NEW) @@ -68,7 +68,7 @@ _LIBCUDACXX_HIDE_FROM_ABI void* __libcpp_operator_new(_Args... __args) } template -_LIBCUDACXX_HIDE_FROM_ABI void __libcpp_operator_delete(_Args... __args) +_LIBCUDACXX_HIDE_FROM_ABI void __cccl_operator_delete(_Args... __args) { // Those builtins are not usable on device and the tests crash when using them #if defined(_CCCL_BUILTIN_OPERATOR_DELETE) @@ -78,17 +78,17 @@ _LIBCUDACXX_HIDE_FROM_ABI void __libcpp_operator_delete(_Args... __args) #endif // !_CCCL_BUILTIN_OPERATOR_DELETE } -_LIBCUDACXX_HIDE_FROM_ABI void* __libcpp_allocate(size_t __size, size_t __align) +_LIBCUDACXX_HIDE_FROM_ABI void* __cccl_allocate(size_t __size, size_t __align) { #ifndef _LIBCUDACXX_HAS_NO_ALIGNED_ALLOCATION if (__is_overaligned_for_new(__align)) { const ::std::align_val_t __align_val = static_cast<::std::align_val_t>(__align); - return __libcpp_operator_new(__size, __align_val); + return __cccl_operator_new(__size, __align_val); } #endif // !_LIBCUDACXX_HAS_NO_ALIGNED_ALLOCATION (void) __align; - return __libcpp_operator_new(__size); + return __cccl_operator_new(__size); } template @@ -96,13 +96,13 @@ _LIBCUDACXX_HIDE_FROM_ABI void __do_deallocate_handle_size(void* __ptr, size_t _ { #ifdef _LIBCUDACXX_HAS_NO_SIZED_DEALLOCATION (void) __size; - return _CUDA_VSTD::__libcpp_operator_delete(__ptr, __args...); + return _CUDA_VSTD::__cccl_operator_delete(__ptr, __args...); #else // ^^^ _LIBCUDACXX_HAS_NO_SIZED_DEALLOCATION ^^^ / vvv !_LIBCUDACXX_HAS_NO_SIZED_DEALLOCATION vvv - return _CUDA_VSTD::__libcpp_operator_delete(__ptr, __size, __args...); + return _CUDA_VSTD::__cccl_operator_delete(__ptr, __size, __args...); #endif // !_LIBCUDACXX_HAS_NO_SIZED_DEALLOCATION } -_LIBCUDACXX_HIDE_FROM_ABI void __libcpp_deallocate(void* __ptr, size_t __size, size_t __align) +_LIBCUDACXX_HIDE_FROM_ABI void __cccl_deallocate(void* __ptr, size_t __size, size_t __align) { #ifndef _LIBCUDACXX_HAS_NO_ALIGNED_ALLOCATION if (__is_overaligned_for_new(__align)) @@ -115,17 +115,17 @@ _LIBCUDACXX_HIDE_FROM_ABI void __libcpp_deallocate(void* __ptr, size_t __size, s return __do_deallocate_handle_size(__ptr, __size); } -_LIBCUDACXX_HIDE_FROM_ABI void __libcpp_deallocate_unsized(void* __ptr, size_t __align) +_LIBCUDACXX_HIDE_FROM_ABI void __cccl_deallocate_unsized(void* __ptr, size_t __align) { #ifndef _LIBCUDACXX_HAS_NO_ALIGNED_ALLOCATION if (__is_overaligned_for_new(__align)) { const ::std::align_val_t __align_val = static_cast<::std::align_val_t>(__align); - return __libcpp_operator_delete(__ptr, __align_val); + return __cccl_operator_delete(__ptr, __align_val); } #endif // !_LIBCUDACXX_HAS_NO_ALIGNED_ALLOCATION (void) __align; - return __libcpp_operator_delete(__ptr); + return __cccl_operator_delete(__ptr); } _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__semaphore/atomic_semaphore.h b/libcudacxx/include/cuda/std/__semaphore/atomic_semaphore.h index 78013392630..fb6d302e771 100644 --- a/libcudacxx/include/cuda/std/__semaphore/atomic_semaphore.h +++ b/libcudacxx/include/cuda/std/__semaphore/atomic_semaphore.h @@ -74,7 +74,7 @@ class __atomic_semaphore _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI bool __acquire_slow_timed(chrono::nanoseconds const& __rel_time) { - return _CUDA_VSTD::__libcpp_thread_poll_with_backoff( + return _CUDA_VSTD::__cccl_thread_poll_with_backoff( [this]() { ptrdiff_t const __old = __count.load(memory_order_acquire); return __old != 0 && __fetch_sub_if_slow(__old); @@ -157,7 +157,7 @@ class __atomic_semaphore<_Sco, 1> _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI bool __acquire_slow_timed(chrono::nanoseconds const& __rel_time) { - return _CUDA_VSTD::__libcpp_thread_poll_with_backoff( + return _CUDA_VSTD::__cccl_thread_poll_with_backoff( [this]() { return try_acquire(); }, diff --git a/libcudacxx/include/cuda/std/__string/string_view.h b/libcudacxx/include/cuda/std/__string/string_view.h index 458c46e3063..46bf51b589c 100644 --- a/libcudacxx/include/cuda/std/__string/string_view.h +++ b/libcudacxx/include/cuda/std/__string/string_view.h @@ -229,7 +229,7 @@ struct __string_view { // If we're in a constant evaluated context, we cannot compare the __str_ // members for equality. - return __compare(__other, bool_constant<__libcpp_default_is_constant_evaluated()>()); + return __compare(__other, bool_constant<__cccl_default_is_constant_evaluated()>()); } _CCCL_NODISCARD_FRIEND _LIBCUDACXX_HIDE_FROM_ABI constexpr bool diff --git a/libcudacxx/include/cuda/std/__thread/threading_support.h b/libcudacxx/include/cuda/std/__thread/threading_support.h index b131dbf0f94..d2ebacf576f 100644 --- a/libcudacxx/include/cuda/std/__thread/threading_support.h +++ b/libcudacxx/include/cuda/std/__thread/threading_support.h @@ -52,13 +52,13 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD # define __LIBCUDACXX_ASM_THREAD_YIELD (;) # endif // !__x86_64__ -_LIBCUDACXX_HIDE_FROM_ABI void __libcpp_thread_yield_processor() +_LIBCUDACXX_HIDE_FROM_ABI void __cccl_thread_yield_processor() { NV_IF_TARGET(NV_IS_HOST, __LIBCUDACXX_ASM_THREAD_YIELD) } template -_LIBCUDACXX_HIDE_FROM_ABI bool __libcpp_thread_poll_with_backoff( +_LIBCUDACXX_HIDE_FROM_ABI bool __cccl_thread_poll_with_backoff( _Fn&& __f, _CUDA_VSTD::chrono::nanoseconds __max = _CUDA_VSTD::chrono::nanoseconds::zero()) { _CUDA_VSTD::chrono::high_resolution_clock::time_point const __start = @@ -73,7 +73,7 @@ _LIBCUDACXX_HIDE_FROM_ABI bool __libcpp_thread_poll_with_backoff( { if (__count > (_LIBCUDACXX_POLLING_COUNT >> 1)) { - _CUDA_VSTD::__libcpp_thread_yield_processor(); + _CUDA_VSTD::__cccl_thread_yield_processor(); } __count += 1; continue; @@ -87,15 +87,15 @@ _LIBCUDACXX_HIDE_FROM_ABI bool __libcpp_thread_poll_with_backoff( _CUDA_VSTD::chrono::nanoseconds const __step = __elapsed / 4; if (__step >= _CUDA_VSTD::chrono::milliseconds(1)) { - _CUDA_VSTD::__libcpp_thread_sleep_for(_CUDA_VSTD::chrono::milliseconds(1)); + _CUDA_VSTD::__cccl_thread_sleep_for(_CUDA_VSTD::chrono::milliseconds(1)); } else if (__step >= _CUDA_VSTD::chrono::microseconds(10)) { - _CUDA_VSTD::__libcpp_thread_sleep_for(__step); + _CUDA_VSTD::__cccl_thread_sleep_for(__step); } else { - _CUDA_VSTD::__libcpp_thread_yield(); + _CUDA_VSTD::__cccl_thread_yield(); } } } diff --git a/libcudacxx/include/cuda/std/__thread/threading_support_cuda.h b/libcudacxx/include/cuda/std/__thread/threading_support_cuda.h index c361b0f7e06..c46cf508dca 100644 --- a/libcudacxx/include/cuda/std/__thread/threading_support_cuda.h +++ b/libcudacxx/include/cuda/std/__thread/threading_support_cuda.h @@ -29,9 +29,9 @@ _CCCL_PUSH_MACROS _LIBCUDACXX_BEGIN_NAMESPACE_STD -_LIBCUDACXX_HIDE_FROM_ABI void __libcpp_thread_yield() {} +_LIBCUDACXX_HIDE_FROM_ABI void __cccl_thread_yield() {} -_LIBCUDACXX_HIDE_FROM_ABI void __libcpp_thread_sleep_for(_CUDA_VSTD::chrono::nanoseconds __ns) +_LIBCUDACXX_HIDE_FROM_ABI void __cccl_thread_sleep_for(_CUDA_VSTD::chrono::nanoseconds __ns) { NV_IF_TARGET(NV_IS_DEVICE, (auto const __step = __ns.count(); assert(__step < numeric_limits::max()); diff --git a/libcudacxx/include/cuda/std/__thread/threading_support_external.h b/libcudacxx/include/cuda/std/__thread/threading_support_external.h index 639e117355c..92d0945a029 100644 --- a/libcudacxx/include/cuda/std/__thread/threading_support_external.h +++ b/libcudacxx/include/cuda/std/__thread/threading_support_external.h @@ -28,9 +28,9 @@ _CCCL_PUSH_MACROS _LIBCUDACXX_BEGIN_NAMESPACE_STD -_LIBCUDACXX_HIDE_FROM_ABI void __libcpp_thread_yield(); +_LIBCUDACXX_HIDE_FROM_ABI void __cccl_thread_yield(); -_LIBCUDACXX_HIDE_FROM_ABI void __libcpp_thread_sleep_for(_CUDA_VSTD::chrono::nanoseconds __ns); +_LIBCUDACXX_HIDE_FROM_ABI void __cccl_thread_sleep_for(_CUDA_VSTD::chrono::nanoseconds __ns); _LIBCUDACXX_END_NAMESPACE_STD diff --git a/libcudacxx/include/cuda/std/__thread/threading_support_pthread.h b/libcudacxx/include/cuda/std/__thread/threading_support_pthread.h index 4b1af8c7bc2..3da59117761 100644 --- a/libcudacxx/include/cuda/std/__thread/threading_support_pthread.h +++ b/libcudacxx/include/cuda/std/__thread/threading_support_pthread.h @@ -40,51 +40,51 @@ _CCCL_PUSH_MACROS -typedef ::timespec __libcpp_timespec_t; +typedef ::timespec __cccl_timespec_t; _LIBCUDACXX_BEGIN_NAMESPACE_STD // Mutex -typedef pthread_mutex_t __libcpp_mutex_t; +typedef pthread_mutex_t __cccl_mutex_t; # define _LIBCUDACXX_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER -typedef pthread_mutex_t __libcpp_recursive_mutex_t; +typedef pthread_mutex_t __cccl_recursive_mutex_t; // Condition Variable -typedef pthread_cond_t __libcpp_condvar_t; +typedef pthread_cond_t __cccl_condvar_t; # define _LIBCUDACXX_CONDVAR_INITIALIZER PTHREAD_COND_INITIALIZER // Semaphore # if defined(__APPLE__) -typedef dispatch_semaphore_t __libcpp_semaphore_t; +typedef dispatch_semaphore_t __cccl_semaphore_t; # define _LIBCUDACXX_SEMAPHORE_MAX numeric_limits::max() # else // ^^^ __APPLE__ ^^^ / vvv !__APPLE__ vvv -typedef sem_t __libcpp_semaphore_t; +typedef sem_t __cccl_semaphore_t; # define _LIBCUDACXX_SEMAPHORE_MAX SEM_VALUE_MAX # endif // !__APPLE__ // Execute once -typedef pthread_once_t __libcpp_exec_once_flag; +typedef pthread_once_t __cccl_exec_once_flag; # define _LIBCUDACXX_EXEC_ONCE_INITIALIZER PTHREAD_ONCE_INIT // Thread id -typedef pthread_t __libcpp_thread_id; +typedef pthread_t __cccl_thread_id; // Thread # define _LIBCUDACXX_NULL_THREAD 0U -typedef pthread_t __libcpp_thread_t; +typedef pthread_t __cccl_thread_t; // Thread Local Storage -typedef pthread_key_t __libcpp_tls_key; +typedef pthread_key_t __cccl_tls_key; # define _LIBCUDACXX_TLS_DESTRUCTOR_CC -_LIBCUDACXX_HIDE_FROM_ABI __libcpp_timespec_t __libcpp_to_timespec(const _CUDA_VSTD::chrono::nanoseconds& __ns) +_LIBCUDACXX_HIDE_FROM_ABI __cccl_timespec_t __cccl_to_timespec(const _CUDA_VSTD::chrono::nanoseconds& __ns) { using namespace chrono; seconds __s = duration_cast(__ns); - __libcpp_timespec_t __ts; + __cccl_timespec_t __ts; typedef decltype(__ts.tv_sec) ts_sec; constexpr ts_sec __ts_sec_max = numeric_limits::max(); @@ -104,73 +104,73 @@ _LIBCUDACXX_HIDE_FROM_ABI __libcpp_timespec_t __libcpp_to_timespec(const _CUDA_V // Semaphore # if defined(__APPLE__) -_LIBCUDACXX_HIDE_FROM_ABI bool __libcpp_semaphore_init(__libcpp_semaphore_t* __sem, int __init) +_LIBCUDACXX_HIDE_FROM_ABI bool __cccl_semaphore_init(__cccl_semaphore_t* __sem, int __init) { return (*__sem = dispatch_semaphore_create(__init)) != nullptr; } -_LIBCUDACXX_HIDE_FROM_ABI bool __libcpp_semaphore_destroy(__libcpp_semaphore_t* __sem) +_LIBCUDACXX_HIDE_FROM_ABI bool __cccl_semaphore_destroy(__cccl_semaphore_t* __sem) { dispatch_release(*__sem); return true; } -_LIBCUDACXX_HIDE_FROM_ABI bool __libcpp_semaphore_post(__libcpp_semaphore_t* __sem) +_LIBCUDACXX_HIDE_FROM_ABI bool __cccl_semaphore_post(__cccl_semaphore_t* __sem) { dispatch_semaphore_signal(*__sem); return true; } -_LIBCUDACXX_HIDE_FROM_ABI bool __libcpp_semaphore_wait(__libcpp_semaphore_t* __sem) +_LIBCUDACXX_HIDE_FROM_ABI bool __cccl_semaphore_wait(__cccl_semaphore_t* __sem) { return dispatch_semaphore_wait(*__sem, DISPATCH_TIME_FOREVER) == 0; } _LIBCUDACXX_HIDE_FROM_ABI bool -__libcpp_semaphore_wait_timed(__libcpp_semaphore_t* __sem, _CUDA_VSTD::chrono::nanoseconds const& __ns) +__cccl_semaphore_wait_timed(__cccl_semaphore_t* __sem, _CUDA_VSTD::chrono::nanoseconds const& __ns) { return dispatch_semaphore_wait(*__sem, dispatch_time(DISPATCH_TIME_NOW, __ns.count())) == 0; } # else // ^^^ __APPLE__ ^^^ / vvv !__APPLE__ vvv -_LIBCUDACXX_HIDE_FROM_ABI bool __libcpp_semaphore_init(__libcpp_semaphore_t* __sem, int __init) +_LIBCUDACXX_HIDE_FROM_ABI bool __cccl_semaphore_init(__cccl_semaphore_t* __sem, int __init) { return sem_init(__sem, 0, __init) == 0; } -_LIBCUDACXX_HIDE_FROM_ABI bool __libcpp_semaphore_destroy(__libcpp_semaphore_t* __sem) +_LIBCUDACXX_HIDE_FROM_ABI bool __cccl_semaphore_destroy(__cccl_semaphore_t* __sem) { return sem_destroy(__sem) == 0; } -_LIBCUDACXX_HIDE_FROM_ABI bool __libcpp_semaphore_post(__libcpp_semaphore_t* __sem) +_LIBCUDACXX_HIDE_FROM_ABI bool __cccl_semaphore_post(__cccl_semaphore_t* __sem) { return sem_post(__sem) == 0; } -_LIBCUDACXX_HIDE_FROM_ABI bool __libcpp_semaphore_wait(__libcpp_semaphore_t* __sem) +_LIBCUDACXX_HIDE_FROM_ABI bool __cccl_semaphore_wait(__cccl_semaphore_t* __sem) { return sem_wait(__sem) == 0; } _LIBCUDACXX_HIDE_FROM_ABI bool -__libcpp_semaphore_wait_timed(__libcpp_semaphore_t* __sem, _CUDA_VSTD::chrono::nanoseconds const& __ns) +__cccl_semaphore_wait_timed(__cccl_semaphore_t* __sem, _CUDA_VSTD::chrono::nanoseconds const& __ns) { - __libcpp_timespec_t __ts = __libcpp_to_timespec(__ns); + __cccl_timespec_t __ts = __cccl_to_timespec(__ns); return sem_timedwait(__sem, &__ts) == 0; } # endif // !__APPLE__ -_LIBCUDACXX_HIDE_FROM_ABI void __libcpp_thread_yield() +_LIBCUDACXX_HIDE_FROM_ABI void __cccl_thread_yield() { sched_yield(); } -_LIBCUDACXX_HIDE_FROM_ABI void __libcpp_thread_sleep_for(_CUDA_VSTD::chrono::nanoseconds __ns) +_LIBCUDACXX_HIDE_FROM_ABI void __cccl_thread_sleep_for(_CUDA_VSTD::chrono::nanoseconds __ns) { - __libcpp_timespec_t __ts = __libcpp_to_timespec(__ns); + __cccl_timespec_t __ts = __cccl_to_timespec(__ns); while (nanosleep(&__ts, &__ts) == -1 && errno == EINTR) ; } diff --git a/libcudacxx/include/cuda/std/__thread/threading_support_win32.h b/libcudacxx/include/cuda/std/__thread/threading_support_win32.h index ff8bd6a35fe..ab59307e5aa 100644 --- a/libcudacxx/include/cuda/std/__thread/threading_support_win32.h +++ b/libcudacxx/include/cuda/std/__thread/threading_support_win32.h @@ -32,47 +32,47 @@ _CCCL_PUSH_MACROS _LIBCUDACXX_BEGIN_NAMESPACE_STD // Mutex -typedef void* __libcpp_mutex_t; +typedef void* __cccl_mutex_t; # define _LIBCUDACXX_MUTEX_INITIALIZER 0 # if defined(_M_IX86) || defined(__i386__) || defined(_M_ARM) || defined(__arm__) -typedef void* __libcpp_recursive_mutex_t[6]; +typedef void* __cccl_recursive_mutex_t[6]; # elif defined(_M_AMD64) || defined(__x86_64__) || defined(_M_ARM64) || defined(__aarch64__) -typedef void* __libcpp_recursive_mutex_t[5]; +typedef void* __cccl_recursive_mutex_t[5]; # else # error Unsupported architecture # endif // Condition Variable -typedef void* __libcpp_condvar_t; +typedef void* __cccl_condvar_t; # define _LIBCUDACXX_CONDVAR_INITIALIZER 0 // Semaphore -typedef void* __libcpp_semaphore_t; +typedef void* __cccl_semaphore_t; // Execute Once -typedef void* __libcpp_exec_once_flag; +typedef void* __cccl_exec_once_flag; # define _LIBCUDACXX_EXEC_ONCE_INITIALIZER 0 // Thread ID -typedef long __libcpp_thread_id; +typedef long __cccl_thread_id; // Thread # define _LIBCUDACXX_NULL_THREAD 0U -typedef void* __libcpp_thread_t; +typedef void* __cccl_thread_t; // Thread Local Storage -typedef long __libcpp_tls_key; +typedef long __cccl_tls_key; # define _LIBCUDACXX_TLS_DESTRUCTOR_CC __stdcall -_LIBCUDACXX_HIDE_FROM_ABI void __libcpp_thread_yield() +_LIBCUDACXX_HIDE_FROM_ABI void __cccl_thread_yield() { SwitchToThread(); } -_LIBCUDACXX_HIDE_FROM_ABI void __libcpp_thread_sleep_for(chrono::nanoseconds __ns) +_LIBCUDACXX_HIDE_FROM_ABI void __cccl_thread_sleep_for(chrono::nanoseconds __ns) { using namespace chrono; // round-up to the nearest milisecond diff --git a/libcudacxx/include/cuda/std/__type_traits/add_lvalue_reference.h b/libcudacxx/include/cuda/std/__type_traits/add_lvalue_reference.h index cc74e6bbbd8..8b70295ce14 100644 --- a/libcudacxx/include/cuda/std/__type_traits/add_lvalue_reference.h +++ b/libcudacxx/include/cuda/std/__type_traits/add_lvalue_reference.h @@ -31,7 +31,7 @@ using add_lvalue_reference_t _CCCL_NODEBUG_ALIAS = _CCCL_BUILTIN_ADD_LVALUE_REFE #else // ^^^ _CCCL_BUILTIN_ADD_LVALUE_REFERENCE ^^^ / vvv !_CCCL_BUILTIN_ADD_LVALUE_REFERENCE vvv -template ::value> +template ::value> struct __add_lvalue_reference_impl { typedef _CCCL_NODEBUG_ALIAS _Tp type; diff --git a/libcudacxx/include/cuda/std/__type_traits/add_pointer.h b/libcudacxx/include/cuda/std/__type_traits/add_pointer.h index bf89c4fd082..65986787c84 100644 --- a/libcudacxx/include/cuda/std/__type_traits/add_pointer.h +++ b/libcudacxx/include/cuda/std/__type_traits/add_pointer.h @@ -34,7 +34,7 @@ template using add_pointer_t _CCCL_NODEBUG_ALIAS = _CCCL_BUILTIN_ADD_POINTER(_Tp); #else // ^^^ _CCCL_BUILTIN_ADD_POINTER ^^^ / vvv !_CCCL_BUILTIN_ADD_POINTER vvv -template ::value || is_void<_Tp>::value> +template ::value || is_void<_Tp>::value> struct __add_pointer_impl { typedef _CCCL_NODEBUG_ALIAS remove_reference_t<_Tp>* type; diff --git a/libcudacxx/include/cuda/std/__type_traits/add_rvalue_reference.h b/libcudacxx/include/cuda/std/__type_traits/add_rvalue_reference.h index c9704de4092..eb9e3f0acdf 100644 --- a/libcudacxx/include/cuda/std/__type_traits/add_rvalue_reference.h +++ b/libcudacxx/include/cuda/std/__type_traits/add_rvalue_reference.h @@ -31,7 +31,7 @@ using add_rvalue_reference_t _CCCL_NODEBUG_ALIAS = _CCCL_BUILTIN_ADD_RVALUE_REFE #else // ^^^ _CCCL_BUILTIN_ADD_RVALUE_REFERENCE ^^^ / vvv !_CCCL_BUILTIN_ADD_RVALUE_REFERENCE vvv -template ::value> +template ::value> struct __add_rvalue_reference_impl { typedef _CCCL_NODEBUG_ALIAS _Tp type; diff --git a/libcudacxx/include/cuda/std/__type_traits/decay.h b/libcudacxx/include/cuda/std/__type_traits/decay.h index 2888466585c..b8d5a744cfd 100644 --- a/libcudacxx/include/cuda/std/__type_traits/decay.h +++ b/libcudacxx/include/cuda/std/__type_traits/decay.h @@ -66,7 +66,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT decay typedef _CCCL_NODEBUG_ALIAS remove_reference_t<_Tp> _Up; public: - typedef _CCCL_NODEBUG_ALIAS typename __decay_impl<_Up, __libcpp_is_referenceable<_Up>::value>::type type; + typedef _CCCL_NODEBUG_ALIAS typename __decay_impl<_Up, __cccl_is_referenceable<_Up>::value>::type type; }; template diff --git a/libcudacxx/include/cuda/std/__type_traits/is_bounded_array.h b/libcudacxx/include/cuda/std/__type_traits/is_bounded_array.h index fa762d24b2d..983e17e3553 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_bounded_array.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_bounded_array.h @@ -26,10 +26,10 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -struct _CCCL_TYPE_VISIBILITY_DEFAULT __libcpp_is_bounded_array : false_type +struct _CCCL_TYPE_VISIBILITY_DEFAULT __cccl_is_bounded_array : false_type {}; template -struct _CCCL_TYPE_VISIBILITY_DEFAULT __libcpp_is_bounded_array<_Tp[_Np]> : true_type +struct _CCCL_TYPE_VISIBILITY_DEFAULT __cccl_is_bounded_array<_Tp[_Np]> : true_type {}; template diff --git a/libcudacxx/include/cuda/std/__type_traits/is_constant_evaluated.h b/libcudacxx/include/cuda/std/__type_traits/is_constant_evaluated.h index b4281c6c637..fc24b17077a 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_constant_evaluated.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_constant_evaluated.h @@ -27,21 +27,16 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr bool is_constant_evaluated() noexcept { return _CCCL_BUILTIN_IS_CONSTANT_EVALUATED(); } - -_LIBCUDACXX_HIDE_FROM_ABI constexpr bool __libcpp_is_constant_evaluated() noexcept -{ - return _CCCL_BUILTIN_IS_CONSTANT_EVALUATED(); -} -_LIBCUDACXX_HIDE_FROM_ABI constexpr bool __libcpp_default_is_constant_evaluated() noexcept +_LIBCUDACXX_HIDE_FROM_ABI constexpr bool __cccl_default_is_constant_evaluated() noexcept { return _CCCL_BUILTIN_IS_CONSTANT_EVALUATED(); } #else // ^^^ _CCCL_BUILTIN_IS_CONSTANT_EVALUATED ^^^ / vvv !_CCCL_BUILTIN_IS_CONSTANT_EVALUATED vvv -_LIBCUDACXX_HIDE_FROM_ABI constexpr bool __libcpp_is_constant_evaluated() noexcept +_LIBCUDACXX_HIDE_FROM_ABI constexpr bool is_constant_evaluated() noexcept { return false; } -_LIBCUDACXX_HIDE_FROM_ABI constexpr bool __libcpp_default_is_constant_evaluated() noexcept +_LIBCUDACXX_HIDE_FROM_ABI constexpr bool __cccl_default_is_constant_evaluated() noexcept { return true; } diff --git a/libcudacxx/include/cuda/std/__type_traits/is_constructible.h b/libcudacxx/include/cuda/std/__type_traits/is_constructible.h index cd82aa9397c..579c45c0295 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_constructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_constructible.h @@ -45,7 +45,7 @@ struct __nat || defined(_LIBCUDACXX_USE_IS_CONSTRUCTIBLE_FALLBACK)) template -struct __libcpp_is_constructible; +struct __cccl_is_constructible; template struct __is_invalid_base_to_derived_cast @@ -54,8 +54,7 @@ struct __is_invalid_base_to_derived_cast using _RawFrom = remove_cvref_t<_From>; using _RawTo = remove_cvref_t<_To>; static const bool value = - _And<_IsNotSame<_RawFrom, _RawTo>, is_base_of<_RawFrom, _RawTo>, _Not<__libcpp_is_constructible<_RawTo, _From>>>:: - value; + _And<_IsNotSame<_RawFrom, _RawTo>, is_base_of<_RawFrom, _RawTo>, _Not<__cccl_is_constructible<_RawTo, _From>>>::value; }; template @@ -123,26 +122,26 @@ struct __is_default_constructible<_Tp[_Nx], false> : __is_default_constructible< {}; template -struct __libcpp_is_constructible +struct __cccl_is_constructible { static_assert(sizeof...(_Args) > 1, "Wrong specialization"); typedef decltype(__is_constructible_helper::__test_nary<_Tp, _Args...>(0)) type; }; template -struct __libcpp_is_constructible<_Tp> : __is_default_constructible<_Tp> +struct __cccl_is_constructible<_Tp> : __is_default_constructible<_Tp> {}; template -struct __libcpp_is_constructible<_Tp, _A0> : public decltype(__is_constructible_helper::__test_unary<_Tp, _A0>(0)) +struct __cccl_is_constructible<_Tp, _A0> : public decltype(__is_constructible_helper::__test_unary<_Tp, _A0>(0)) {}; template -struct __libcpp_is_constructible<_Tp&, _A0> : public decltype(__is_constructible_helper::__test_cast<_Tp&, _A0>(0)) +struct __cccl_is_constructible<_Tp&, _A0> : public decltype(__is_constructible_helper::__test_cast<_Tp&, _A0>(0)) {}; template -struct __libcpp_is_constructible<_Tp&&, _A0> : public decltype(__is_constructible_helper::__test_cast<_Tp&&, _A0>(0)) +struct __cccl_is_constructible<_Tp&&, _A0> : public decltype(__is_constructible_helper::__test_cast<_Tp&&, _A0>(0)) {}; #endif @@ -160,7 +159,7 @@ _CCCL_INLINE_VAR constexpr bool is_constructible_v = _CCCL_BUILTIN_IS_CONSTRUCTI #else template -struct _CCCL_TYPE_VISIBILITY_DEFAULT is_constructible : public __libcpp_is_constructible<_Tp, _Args...>::type +struct _CCCL_TYPE_VISIBILITY_DEFAULT is_constructible : public __cccl_is_constructible<_Tp, _Args...>::type {}; # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_empty.h b/libcudacxx/include/cuda/std/__type_traits/is_empty.h index 4b11bc7da88..dc2a3691321 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_empty.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_empty.h @@ -50,15 +50,15 @@ struct __is_empty2 }; template -struct __libcpp_empty : public integral_constant) == sizeof(__is_empty2)> +struct __cccl_empty : public integral_constant) == sizeof(__is_empty2)> {}; template -struct __libcpp_empty<_Tp, false> : public false_type +struct __cccl_empty<_Tp, false> : public false_type {}; template -struct _CCCL_TYPE_VISIBILITY_DEFAULT is_empty : public __libcpp_empty<_Tp> +struct _CCCL_TYPE_VISIBILITY_DEFAULT is_empty : public __cccl_empty<_Tp> {}; # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_floating_point.h b/libcudacxx/include/cuda/std/__type_traits/is_floating_point.h index 59336c6acad..913bacdb2a6 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_floating_point.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_floating_point.h @@ -26,20 +26,20 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -struct __libcpp_is_floating_point : public false_type +struct __cccl_is_floating_point : public false_type {}; template <> -struct __libcpp_is_floating_point : public true_type +struct __cccl_is_floating_point : public true_type {}; template <> -struct __libcpp_is_floating_point : public true_type +struct __cccl_is_floating_point : public true_type {}; template <> -struct __libcpp_is_floating_point : public true_type +struct __cccl_is_floating_point : public true_type {}; template -struct _CCCL_TYPE_VISIBILITY_DEFAULT is_floating_point : public __libcpp_is_floating_point> +struct _CCCL_TYPE_VISIBILITY_DEFAULT is_floating_point : public __cccl_is_floating_point> {}; #if !defined(_CCCL_NO_VARIABLE_TEMPLATES) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_integral.h b/libcudacxx/include/cuda/std/__type_traits/is_integral.h index d3b412b8135..eddcba144c5 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_integral.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_integral.h @@ -39,72 +39,72 @@ _CCCL_INLINE_VAR constexpr bool is_integral_v = _CCCL_BUILTIN_IS_INTEGRAL(_Tp); #else // ^^^ _CCCL_BUILTIN_IS_INTEGRAL ^^^ / vvv !_CCCL_BUILTIN_IS_INTEGRAL vvv template -struct __libcpp_is_integral : public false_type +struct __cccl_is_integral : public false_type {}; template <> -struct __libcpp_is_integral : public true_type +struct __cccl_is_integral : public true_type {}; template <> -struct __libcpp_is_integral : public true_type +struct __cccl_is_integral : public true_type {}; template <> -struct __libcpp_is_integral : public true_type +struct __cccl_is_integral : public true_type {}; template <> -struct __libcpp_is_integral : public true_type +struct __cccl_is_integral : public true_type {}; template <> -struct __libcpp_is_integral : public true_type +struct __cccl_is_integral : public true_type {}; # ifndef _LIBCUDACXX_NO_HAS_CHAR8_T template <> -struct __libcpp_is_integral : public true_type +struct __cccl_is_integral : public true_type {}; # endif # ifndef _LIBCUDACXX_HAS_NO_UNICODE_CHARS template <> -struct __libcpp_is_integral : public true_type +struct __cccl_is_integral : public true_type {}; template <> -struct __libcpp_is_integral : public true_type +struct __cccl_is_integral : public true_type {}; # endif // _LIBCUDACXX_HAS_NO_UNICODE_CHARS template <> -struct __libcpp_is_integral : public true_type +struct __cccl_is_integral : public true_type {}; template <> -struct __libcpp_is_integral : public true_type +struct __cccl_is_integral : public true_type {}; template <> -struct __libcpp_is_integral : public true_type +struct __cccl_is_integral : public true_type {}; template <> -struct __libcpp_is_integral : public true_type +struct __cccl_is_integral : public true_type {}; template <> -struct __libcpp_is_integral : public true_type +struct __cccl_is_integral : public true_type {}; template <> -struct __libcpp_is_integral : public true_type +struct __cccl_is_integral : public true_type {}; template <> -struct __libcpp_is_integral : public true_type +struct __cccl_is_integral : public true_type {}; template <> -struct __libcpp_is_integral : public true_type +struct __cccl_is_integral : public true_type {}; # ifndef _LIBCUDACXX_HAS_NO_INT128 template <> -struct __libcpp_is_integral<__int128_t> : public true_type +struct __cccl_is_integral<__int128_t> : public true_type {}; template <> -struct __libcpp_is_integral<__uint128_t> : public true_type +struct __cccl_is_integral<__uint128_t> : public true_type {}; # endif template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_integral - : public integral_constant>::value> + : public integral_constant>::value> {}; # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_member_function_pointer.h b/libcudacxx/include/cuda/std/__type_traits/is_member_function_pointer.h index 943ed414a5c..fff6f96ee81 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_member_function_pointer.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_member_function_pointer.h @@ -28,7 +28,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -struct __libcpp_is_member_pointer +struct __cccl_is_member_pointer { enum { @@ -38,7 +38,7 @@ struct __libcpp_is_member_pointer }; }; template -struct __libcpp_is_member_pointer<_Tp _Up::*> +struct __cccl_is_member_pointer<_Tp _Up::*> { enum { @@ -64,7 +64,7 @@ _CCCL_INLINE_VAR constexpr bool is_member_function_pointer_v = _CCCL_BUILTIN_IS_ template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_member_function_pointer - : public integral_constant>::__is_func> + : public integral_constant>::__is_func> {}; # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_member_object_pointer.h b/libcudacxx/include/cuda/std/__type_traits/is_member_object_pointer.h index b9f411cf9d7..86ce9dd9d26 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_member_object_pointer.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_member_object_pointer.h @@ -42,7 +42,7 @@ _CCCL_INLINE_VAR constexpr bool is_member_object_pointer_v = _CCCL_BUILTIN_IS_ME template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_member_object_pointer - : public integral_constant>::__is_obj> + : public integral_constant>::__is_obj> {}; # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_member_pointer.h b/libcudacxx/include/cuda/std/__type_traits/is_member_pointer.h index 2f0ff0d5eb6..74ceaf6e7d3 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_member_pointer.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_member_pointer.h @@ -42,7 +42,7 @@ _CCCL_INLINE_VAR constexpr bool is_member_pointer_v = _CCCL_BUILTIN_IS_MEMBER_PO template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_member_pointer - : public integral_constant>::__is_member> + : public integral_constant>::__is_member> {}; # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_assignable.h b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_assignable.h index 3232e3eff2c..b12662cb9cc 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_assignable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_assignable.h @@ -42,20 +42,20 @@ _CCCL_INLINE_VAR constexpr bool is_nothrow_assignable_v = _CCCL_BUILTIN_IS_NOTHR #elif !defined(_LIBCUDACXX_HAS_NO_NOEXCEPT) && !defined(_LIBCUDACXX_HAS_NO_NOEXCEPT_SFINAE) template -struct __libcpp_is_nothrow_assignable; +struct __cccl_is_nothrow_assignable; template -struct __libcpp_is_nothrow_assignable : public false_type +struct __cccl_is_nothrow_assignable : public false_type {}; template -struct __libcpp_is_nothrow_assignable +struct __cccl_is_nothrow_assignable : public integral_constant() = _CUDA_VSTD::declval<_Arg>())> {}; template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_assignable - : public __libcpp_is_nothrow_assignable::value, _Tp, _Arg> + : public __cccl_is_nothrow_assignable::value, _Tp, _Arg> {}; # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_constructible.h b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_constructible.h index b225e46cbc0..62440f9b26e 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_constructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_constructible.h @@ -44,10 +44,10 @@ _CCCL_INLINE_VAR constexpr bool is_nothrow_constructible_v = _CCCL_BUILTIN_IS_NO # if !defined(_LIBCUDACXX_HAS_NO_NOEXCEPT) template -struct __libcpp_is_nothrow_constructible; +struct __cccl_is_nothrow_constructible; template -struct __libcpp_is_nothrow_constructible +struct __cccl_is_nothrow_constructible : public integral_constant()...))> {}; @@ -56,22 +56,22 @@ _LIBCUDACXX_HIDE_FROM_ABI void __implicit_conversion_to(_Tp) noexcept {} template -struct __libcpp_is_nothrow_constructible +struct __cccl_is_nothrow_constructible : public integral_constant(_CUDA_VSTD::declval<_Arg>()))> {}; template -struct __libcpp_is_nothrow_constructible : public false_type +struct __cccl_is_nothrow_constructible : public false_type {}; template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_constructible - : __libcpp_is_nothrow_constructible::value, is_reference<_Tp>::value, _Tp, _Args...> + : __cccl_is_nothrow_constructible::value, is_reference<_Tp>::value, _Tp, _Args...> {}; template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_constructible<_Tp[_Ns]> - : __libcpp_is_nothrow_constructible::value, is_reference<_Tp>::value, _Tp> + : __cccl_is_nothrow_constructible::value, is_reference<_Tp>::value, _Tp> {}; # else diff --git a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_destructible.h b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_destructible.h index 1cd366424de..23821feaffd 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_nothrow_destructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_nothrow_destructible.h @@ -41,16 +41,16 @@ struct is_nothrow_destructible : public integral_constant::value> -struct __libcpp_is_nothrow_destructible : false_type +struct __cccl_is_nothrow_destructible : false_type {}; template -struct __libcpp_is_nothrow_destructible<_Tp, true> +struct __cccl_is_nothrow_destructible<_Tp, true> : public integral_constant().~_Tp())> {}; template -struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_destructible : public __libcpp_is_nothrow_destructible<_Tp> +struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_destructible : public __cccl_is_nothrow_destructible<_Tp> {}; template @@ -68,12 +68,12 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_destructible<_Tp&&> : public tru #else template -struct __libcpp_nothrow_destructor : public integral_constant::value || is_reference<_Tp>::value> +struct __cccl_nothrow_destructor : public integral_constant::value || is_reference<_Tp>::value> {}; template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_destructible - : public __libcpp_nothrow_destructor> + : public __cccl_nothrow_destructor> {}; template diff --git a/libcudacxx/include/cuda/std/__type_traits/is_pointer.h b/libcudacxx/include/cuda/std/__type_traits/is_pointer.h index b87e5537ca1..67969fbbb56 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_pointer.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_pointer.h @@ -39,14 +39,14 @@ _CCCL_INLINE_VAR constexpr bool is_pointer_v = _CCCL_BUILTIN_IS_POINTER(_Tp); #else template -struct __libcpp_is_pointer : public false_type +struct __cccl_is_pointer : public false_type {}; template -struct __libcpp_is_pointer<_Tp*> : public true_type +struct __cccl_is_pointer<_Tp*> : public true_type {}; template -struct _CCCL_TYPE_VISIBILITY_DEFAULT is_pointer : public __libcpp_is_pointer> +struct _CCCL_TYPE_VISIBILITY_DEFAULT is_pointer : public __cccl_is_pointer> {}; # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_referenceable.h b/libcudacxx/include/cuda/std/__type_traits/is_referenceable.h index 63d2d71fb52..c2ddc771904 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_referenceable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_referenceable.h @@ -28,11 +28,11 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD #if defined(_CCCL_BUILTIN_IS_REFERENCEABLE) && !defined(_LIBCUDACXX_USE_IS_REFERENCEABLE_FALLBACK) template -struct __libcpp_is_referenceable : public integral_constant +struct __cccl_is_referenceable : public integral_constant {}; #else -struct __libcpp_is_referenceable_impl +struct __cccl_is_referenceable_impl { template _CCCL_HOST_DEVICE static _Tp& __test(int); @@ -41,8 +41,8 @@ struct __libcpp_is_referenceable_impl }; template -struct __libcpp_is_referenceable - : integral_constant(0)), false_type>::value> +struct __cccl_is_referenceable + : integral_constant(0)), false_type>::value> {}; #endif // defined(_CCCL_BUILTIN_IS_REFERENCEABLE) && !defined(_LIBCUDACXX_USE_IS_REFERENCEABLE_FALLBACK) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_signed.h b/libcudacxx/include/cuda/std/__type_traits/is_signed.h index 33e5c1eb5c5..220790002ba 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_signed.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_signed.h @@ -42,23 +42,23 @@ _CCCL_INLINE_VAR constexpr bool is_signed_v = _CCCL_BUILTIN_IS_SIGNED(_Tp); #else template ::value> -struct __libcpp_is_signed_impl : public bool_constant<(_Tp(-1) < _Tp(0))> +struct __cccl_is_signed_impl : public bool_constant<(_Tp(-1) < _Tp(0))> {}; template -struct __libcpp_is_signed_impl<_Tp, false> : public true_type +struct __cccl_is_signed_impl<_Tp, false> : public true_type {}; // floating point template ::value> -struct __libcpp_is_signed : public __libcpp_is_signed_impl<_Tp> +struct __cccl_is_signed : public __cccl_is_signed_impl<_Tp> {}; template -struct __libcpp_is_signed<_Tp, false> : public false_type +struct __cccl_is_signed<_Tp, false> : public false_type {}; template -struct _CCCL_TYPE_VISIBILITY_DEFAULT is_signed : public __libcpp_is_signed<_Tp> +struct _CCCL_TYPE_VISIBILITY_DEFAULT is_signed : public __cccl_is_signed<_Tp> {}; # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_signed_integer.h b/libcudacxx/include/cuda/std/__type_traits/is_signed_integer.h index 69ce3aa8a6e..273df0d830b 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_signed_integer.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_signed_integer.h @@ -25,26 +25,26 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -struct __libcpp_is_signed_integer : public false_type +struct __cccl_is_signed_integer : public false_type {}; template <> -struct __libcpp_is_signed_integer : public true_type +struct __cccl_is_signed_integer : public true_type {}; template <> -struct __libcpp_is_signed_integer : public true_type +struct __cccl_is_signed_integer : public true_type {}; template <> -struct __libcpp_is_signed_integer : public true_type +struct __cccl_is_signed_integer : public true_type {}; template <> -struct __libcpp_is_signed_integer : public true_type +struct __cccl_is_signed_integer : public true_type {}; template <> -struct __libcpp_is_signed_integer : public true_type +struct __cccl_is_signed_integer : public true_type {}; #ifndef _LIBCUDACXX_HAS_NO_INT128 template <> -struct __libcpp_is_signed_integer<__int128_t> : public true_type +struct __cccl_is_signed_integer<__int128_t> : public true_type {}; #endif diff --git a/libcudacxx/include/cuda/std/__type_traits/is_swappable.h b/libcudacxx/include/cuda/std/__type_traits/is_swappable.h index 964f14d6381..d2727ced8b4 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_swappable.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_swappable.h @@ -163,7 +163,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_swappable_with template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_swappable - : public conditional_t<__libcpp_is_referenceable<_Tp>::value, + : public conditional_t<__cccl_is_referenceable<_Tp>::value, is_swappable_with, add_lvalue_reference_t<_Tp>>, false_type> {}; @@ -175,7 +175,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_swappable_with template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_nothrow_swappable - : public conditional_t<__libcpp_is_referenceable<_Tp>::value, + : public conditional_t<__cccl_is_referenceable<_Tp>::value, is_nothrow_swappable_with, add_lvalue_reference_t<_Tp>>, false_type> {}; diff --git a/libcudacxx/include/cuda/std/__type_traits/is_trivially_destructible.h b/libcudacxx/include/cuda/std/__type_traits/is_trivially_destructible.h index 9116ced5e8f..57a4af4829c 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_trivially_destructible.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_trivially_destructible.h @@ -47,12 +47,12 @@ _CCCL_SUPPRESS_DEPRECATED_POP #else template -struct __libcpp_trivial_destructor : public integral_constant::value || is_reference<_Tp>::value> +struct __cccl_trivial_destructor : public integral_constant::value || is_reference<_Tp>::value> {}; template struct _CCCL_TYPE_VISIBILITY_DEFAULT is_trivially_destructible - : public __libcpp_trivial_destructor> + : public __cccl_trivial_destructor> {}; template diff --git a/libcudacxx/include/cuda/std/__type_traits/is_unbounded_array.h b/libcudacxx/include/cuda/std/__type_traits/is_unbounded_array.h index 501efded75a..2e09d4c8726 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_unbounded_array.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_unbounded_array.h @@ -25,10 +25,10 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -struct _CCCL_TYPE_VISIBILITY_DEFAULT __libcpp_is_unbounded_array : false_type +struct _CCCL_TYPE_VISIBILITY_DEFAULT __cccl_is_unbounded_array : false_type {}; template -struct _CCCL_TYPE_VISIBILITY_DEFAULT __libcpp_is_unbounded_array<_Tp[]> : true_type +struct _CCCL_TYPE_VISIBILITY_DEFAULT __cccl_is_unbounded_array<_Tp[]> : true_type {}; template diff --git a/libcudacxx/include/cuda/std/__type_traits/is_union.h b/libcudacxx/include/cuda/std/__type_traits/is_union.h index 37ee313d8a3..9978f99e6be 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_union.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_union.h @@ -39,10 +39,10 @@ _CCCL_INLINE_VAR constexpr bool is_union_v = _CCCL_BUILTIN_IS_UNION(_Tp); #else template -struct __libcpp_union : public false_type +struct __cccl_union : public false_type {}; template -struct _CCCL_TYPE_VISIBILITY_DEFAULT is_union : public __libcpp_union> +struct _CCCL_TYPE_VISIBILITY_DEFAULT is_union : public __cccl_union> {}; # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_unsigned.h b/libcudacxx/include/cuda/std/__type_traits/is_unsigned.h index abd951c7202..4a5ad7d92e2 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_unsigned.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_unsigned.h @@ -45,23 +45,23 @@ _CCCL_INLINE_VAR constexpr bool is_unsigned_v = _CCCL_BUILTIN_IS_UNSIGNED(_Tp); #else template ::value> -struct __libcpp_is_unsigned_impl : public bool_constant<(_Tp(0) < _Tp(-1))> +struct __cccl_is_unsigned_impl : public bool_constant<(_Tp(0) < _Tp(-1))> {}; template -struct __libcpp_is_unsigned_impl<_Tp, false> : public false_type +struct __cccl_is_unsigned_impl<_Tp, false> : public false_type {}; // floating point template ::value> -struct __libcpp_is_unsigned : public __libcpp_is_unsigned_impl<_Tp> +struct __cccl_is_unsigned : public __cccl_is_unsigned_impl<_Tp> {}; template -struct __libcpp_is_unsigned<_Tp, false> : public false_type +struct __cccl_is_unsigned<_Tp, false> : public false_type {}; template -struct _CCCL_TYPE_VISIBILITY_DEFAULT is_unsigned : public __libcpp_is_unsigned<_Tp> +struct _CCCL_TYPE_VISIBILITY_DEFAULT is_unsigned : public __cccl_is_unsigned<_Tp> {}; # if !defined(_CCCL_NO_VARIABLE_TEMPLATES) diff --git a/libcudacxx/include/cuda/std/__type_traits/is_unsigned_integer.h b/libcudacxx/include/cuda/std/__type_traits/is_unsigned_integer.h index 888020032ed..088c98af66a 100644 --- a/libcudacxx/include/cuda/std/__type_traits/is_unsigned_integer.h +++ b/libcudacxx/include/cuda/std/__type_traits/is_unsigned_integer.h @@ -25,26 +25,26 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD template -struct __libcpp_is_unsigned_integer : public false_type +struct __cccl_is_unsigned_integer : public false_type {}; template <> -struct __libcpp_is_unsigned_integer : public true_type +struct __cccl_is_unsigned_integer : public true_type {}; template <> -struct __libcpp_is_unsigned_integer : public true_type +struct __cccl_is_unsigned_integer : public true_type {}; template <> -struct __libcpp_is_unsigned_integer : public true_type +struct __cccl_is_unsigned_integer : public true_type {}; template <> -struct __libcpp_is_unsigned_integer : public true_type +struct __cccl_is_unsigned_integer : public true_type {}; template <> -struct __libcpp_is_unsigned_integer : public true_type +struct __cccl_is_unsigned_integer : public true_type {}; #ifndef _LIBCUDACXX_HAS_NO_INT128 template <> -struct __libcpp_is_unsigned_integer<__uint128_t> : public true_type +struct __cccl_is_unsigned_integer<__uint128_t> : public true_type {}; #endif diff --git a/libcudacxx/include/cuda/std/__utility/unreachable.h b/libcudacxx/include/cuda/std/__utility/unreachable.h index e0d704c9b6d..a3b23397e0a 100644 --- a/libcudacxx/include/cuda/std/__utility/unreachable.h +++ b/libcudacxx/include/cuda/std/__utility/unreachable.h @@ -22,7 +22,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD -_CCCL_NORETURN _LIBCUDACXX_HIDE_FROM_ABI void __libcpp_unreachable() +_CCCL_NORETURN _LIBCUDACXX_HIDE_FROM_ABI void __cccl_unreachable() { _CCCL_UNREACHABLE(); } diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/__string b/libcudacxx/include/cuda/std/detail/libcxx/include/__string index 93cba133797..20857deef7c 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/__string +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/__string @@ -262,7 +262,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT char_traits { #if _CCCL_COMPILER(GCC, <, 13) // absurd workaround for GCC "internal compiler error: in cxx_eval_array_reference" - if (__libcpp_is_constant_evaluated()) + if (_CUDA_VSTD::is_constant_evaluated()) ; #endif #if defined(_CCCL_BUILTIN_STRLEN) @@ -470,7 +470,7 @@ _LIBCUDACXX_HIDE_FROM_ABI constexpr size_t __char_traits_length_checked(const ty #if _LIBCUDACXX_DEBUG_LEVEL >= 1 return __s ? _Traits::length(__s) - : (_CUDA_VSTD::__libcpp_debug_function(_CUDA_VSTD::__libcpp_debug_info( + : (_CUDA_VSTD::__cccl_debug_function(_CUDA_VSTD::__cccl_debug_info( __FILE__, __LINE__, "p == nullptr", "null pointer pass to non-null argument of char_traits<...>::length")), 0); #else diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/algorithm b/libcudacxx/include/cuda/std/detail/libcxx/include/algorithm index 01e92219370..ec32a3e3f77 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/algorithm +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/algorithm @@ -1070,7 +1070,7 @@ typename uniform_int_distribution<_IntType>::result_type uniform_int_distributio { return static_cast(_Eng(__g, _Dt)()); } - size_t __w = _Dt - __libcpp_clz(_Rp) - 1; + size_t __w = _Dt - __cccl_clz(_Rp) - 1; if ((_Rp & (std::numeric_limits<_UIntType>::max() >> (_Dt - __w))) != 0) { ++__w; diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/complex b/libcudacxx/include/cuda/std/detail/libcxx/include/complex index 4e98f7c9774..7eecbcc4a20 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/complex +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/complex @@ -509,7 +509,7 @@ operator*(const complex<_Tp>& __z, const complex<_Tp>& __w) #if _CCCL_STD_VER > 2011 && defined(_CCCL_BUILTIN_IS_CONSTANT_EVALUATED) // Avoid floating point operations that are invalid during constant evaluation - if (__libcpp_is_constant_evaluated()) + if (_CUDA_VSTD::is_constant_evaluated()) { bool __z_zero = __a == _Tp(0) && __b == _Tp(0); bool __w_zero = __c == _Tp(0) && __d == _Tp(0); @@ -652,7 +652,7 @@ operator/(const complex<_Tp>& __z, const complex<_Tp>& __w) #if _CCCL_STD_VER > 2011 && defined(_CCCL_BUILTIN_IS_CONSTANT_EVALUATED) // Avoid floating point operations that are invalid during constant evaluation - if (__libcpp_is_constant_evaluated()) + if (_CUDA_VSTD::is_constant_evaluated()) { bool __z_zero = __a == _Tp(0) && __b == _Tp(0); bool __w_zero = __c == _Tp(0) && __d == _Tp(0); @@ -841,12 +841,12 @@ _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _Tp real(const complex<_Tp>& __c // 26.3.7 values: template -struct __libcpp_complex_overload_traits +struct __cccl_complex_overload_traits {}; // Integral Types template -struct __libcpp_complex_overload_traits<_Tp, true, false> +struct __cccl_complex_overload_traits<_Tp, true, false> { using _ValueType = double; using _ComplexType = complex; @@ -854,20 +854,20 @@ struct __libcpp_complex_overload_traits<_Tp, true, false> // Floating point types template -struct __libcpp_complex_overload_traits<_Tp, false, true> +struct __cccl_complex_overload_traits<_Tp, false, true> { using _ValueType = _Tp; using _ComplexType = complex<_Tp>; }; template -using __libcpp_complex_value_type = typename __libcpp_complex_overload_traits<_Tp>::_ValueType; +using __cccl_complex_value_type = typename __cccl_complex_overload_traits<_Tp>::_ValueType; template -using __libcpp_complex_complex_type = typename __libcpp_complex_overload_traits<_Tp>::_ComplexType; +using __cccl_complex_complex_type = typename __cccl_complex_overload_traits<_Tp>::_ComplexType; template -_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 __libcpp_complex_value_type<_Tp> real(_Tp __re) +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 __cccl_complex_value_type<_Tp> real(_Tp __re) { return __re; } @@ -881,7 +881,7 @@ _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _Tp imag(const complex<_Tp>& __c } template -_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 __libcpp_complex_value_type<_Tp> imag(_Tp) +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 __cccl_complex_value_type<_Tp> imag(_Tp) { return 0; } @@ -940,9 +940,9 @@ _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _Tp norm(const complex<_Tp>& __c } template -_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 __libcpp_complex_value_type<_Tp> norm(_Tp __re) +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 __cccl_complex_value_type<_Tp> norm(_Tp __re) { - return static_cast<__libcpp_complex_value_type<_Tp>>(__re) * __re; + return static_cast<__cccl_complex_value_type<_Tp>>(__re) * __re; } // conj @@ -954,9 +954,9 @@ _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 complex<_Tp> conj(const complex< } template -_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 __libcpp_complex_complex_type<_Tp> conj(_Tp __re) +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 __cccl_complex_complex_type<_Tp> conj(_Tp __re) { - return __libcpp_complex_complex_type<_Tp>(__re); + return __cccl_complex_complex_type<_Tp>(__re); } // proj @@ -973,7 +973,7 @@ _LIBCUDACXX_HIDE_FROM_ABI complex<_Tp> proj(const complex<_Tp>& __c) } template -_LIBCUDACXX_HIDE_FROM_ABI enable_if_t<__is_complex_float<_Tp>::value, __libcpp_complex_complex_type<_Tp>> proj(_Tp __re) +_LIBCUDACXX_HIDE_FROM_ABI enable_if_t<__is_complex_float<_Tp>::value, __cccl_complex_complex_type<_Tp>> proj(_Tp __re) { if (_CUDA_VSTD::__constexpr_isinf(__re)) { @@ -983,9 +983,9 @@ _LIBCUDACXX_HIDE_FROM_ABI enable_if_t<__is_complex_float<_Tp>::value, __libcpp_c } template -_LIBCUDACXX_HIDE_FROM_ABI enable_if_t::value, __libcpp_complex_complex_type<_Tp>> proj(_Tp __re) +_LIBCUDACXX_HIDE_FROM_ABI enable_if_t::value, __cccl_complex_complex_type<_Tp>> proj(_Tp __re) { - return __libcpp_complex_complex_type<_Tp>(__re); + return __cccl_complex_complex_type<_Tp>(__re); } // polar diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/limits b/libcudacxx/include/cuda/std/detail/libcxx/include/limits index ea830da6046..82f6a00c804 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/limits +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/limits @@ -141,7 +141,7 @@ enum float_denorm_style }; template ::value> -class __libcpp_numeric_limits +class __cccl_numeric_limits { protected: typedef _Tp type; @@ -215,20 +215,20 @@ protected: _CCCL_DIAG_PUSH _CCCL_DIAG_SUPPRESS_MSVC(4309) template -struct __libcpp_compute_min +struct __cccl_compute_min { static constexpr _Tp value = static_cast<_Tp>(_Tp(1) << __digits); }; _CCCL_DIAG_POP template -struct __libcpp_compute_min<_Tp, __digits, false> +struct __cccl_compute_min<_Tp, __digits, false> { static constexpr _Tp value = _Tp(0); }; template -class __libcpp_numeric_limits<_Tp, true> +class __cccl_numeric_limits<_Tp, true> { protected: typedef _Tp type; @@ -239,7 +239,7 @@ protected: static constexpr int digits = static_cast(sizeof(type) * __CHAR_BIT__ - is_signed); static constexpr int digits10 = digits * 3 / 10; static constexpr int max_digits10 = 0; - static constexpr type __min = __libcpp_compute_min::value; + static constexpr type __min = __cccl_compute_min::value; static constexpr type __max = is_signed ? type(type(~0) ^ __min) : type(~0); _LIBCUDACXX_HIDE_FROM_ABI static constexpr type min() noexcept { @@ -307,7 +307,7 @@ protected: }; template <> -class __libcpp_numeric_limits +class __cccl_numeric_limits { protected: typedef bool type; @@ -382,7 +382,7 @@ protected: }; template <> -class __libcpp_numeric_limits +class __cccl_numeric_limits { protected: typedef float type; @@ -470,7 +470,7 @@ protected: }; template <> -class __libcpp_numeric_limits +class __cccl_numeric_limits { protected: typedef double type; @@ -558,7 +558,7 @@ protected: }; template <> -class __libcpp_numeric_limits +class __cccl_numeric_limits { #ifndef _LIBCUDACXX_HAS_NO_LONG_DOUBLE @@ -634,9 +634,9 @@ protected: }; template -class _CCCL_TYPE_VISIBILITY_DEFAULT numeric_limits : private __libcpp_numeric_limits> +class _CCCL_TYPE_VISIBILITY_DEFAULT numeric_limits : private __cccl_numeric_limits> { - typedef __libcpp_numeric_limits> __base; + typedef __cccl_numeric_limits> __base; typedef typename __base::type type; public: diff --git a/libcudacxx/test/NOTES.TXT b/libcudacxx/test/NOTES.TXT index 602de495103..ae5c1575281 100644 --- a/libcudacxx/test/NOTES.TXT +++ b/libcudacxx/test/NOTES.TXT @@ -12,7 +12,7 @@ These notes contain a list of things that must be done after branching for an LLVM release. 1. Update _LIBCUDACXX_VERSION in `__config` -2. Update the __libcpp_version file. +2. Update the __cccl_version file. 3. Update the version number in `docs/conf.py` 4. Create ABI lists for the previous release under `lib/abi` diff --git a/libcudacxx/test/libcudacxx/libcxx/type_traits/is_constant_evaluated.pass.cpp b/libcudacxx/test/libcudacxx/libcxx/type_traits/is_constant_evaluated.pass.cpp index 56aa5c72b3d..cacffd6bc5b 100644 --- a/libcudacxx/test/libcudacxx/libcxx/type_traits/is_constant_evaluated.pass.cpp +++ b/libcudacxx/test/libcudacxx/libcxx/type_traits/is_constant_evaluated.pass.cpp @@ -9,7 +9,7 @@ // -// __libcpp_is_constant_evaluated() +// _CUDA_VSTD::is_constant_evaluated() // returns false when there's no constant evaluation support from the compiler. // as well as when called not in a constexpr context @@ -21,14 +21,14 @@ int main(int, char**) { - ASSERT_SAME_TYPE(decltype(cuda::std::__libcpp_is_constant_evaluated()), bool); - ASSERT_NOEXCEPT(cuda::std::__libcpp_is_constant_evaluated()); + ASSERT_SAME_TYPE(decltype(cuda::std::is_constant_evaluated()), bool); + ASSERT_NOEXCEPT(cuda::std::is_constant_evaluated()); #if defined(_CCCL_BUILTIN_IS_CONSTANT_EVALUATED) - static_assert(cuda::std::__libcpp_is_constant_evaluated(), ""); + static_assert(cuda::std::is_constant_evaluated(), ""); #endif - bool p = cuda::std::__libcpp_is_constant_evaluated(); + bool p = cuda::std::is_constant_evaluated(); assert(!p); return 0; diff --git a/libcudacxx/test/libcudacxx/libcxx/utilities/meta/is_referenceable.pass.cpp b/libcudacxx/test/libcudacxx/libcxx/utilities/meta/is_referenceable.pass.cpp index 8ea4ad3f34f..d1a83917feb 100644 --- a/libcudacxx/test/libcudacxx/libcxx/utilities/meta/is_referenceable.pass.cpp +++ b/libcudacxx/test/libcudacxx/libcxx/utilities/meta/is_referenceable.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // -// __libcpp_is_referenceable +// __cccl_is_referenceable // // [defns.referenceable] defines "a referenceable type" as: // An object type, a function type that does not have cv-qualifiers @@ -22,141 +22,141 @@ struct Foo {}; -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); #ifndef _LIBCUDACXX_HAS_NO_VECTOR_EXTENSION -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); #endif // Functions without cv-qualifiers are referenceable -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); - -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); - -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); - -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); - -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); - -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); - -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); - -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((!cuda::std::__libcpp_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); + +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); + +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); + +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); + +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); + +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); + +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); + +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); +static_assert((!cuda::std::__cccl_is_referenceable::value), ""); // member functions with or without cv-qualifiers are referenceable -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); - -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); - -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); - -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); - -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); - -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); - -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); - -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); -static_assert((cuda::std::__libcpp_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); + +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); + +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); + +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); + +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); + +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); + +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); + +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); +static_assert((cuda::std::__cccl_is_referenceable::value), ""); int main(int, char**) { diff --git a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp index d3217b85baf..c02f29f0178 100644 --- a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy.pass.cpp @@ -78,7 +78,7 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() assert(j == 75); test, random_access_iterator>(); - if (!cuda::std::__libcpp_is_constant_evaluated()) // This breaks some compilers due to excessive constant folding + if (!cuda::std::is_constant_evaluated()) // This breaks some compilers due to excessive constant folding { test, int*>(); test>(); @@ -86,7 +86,7 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() } test, random_access_iterator>(); - if (!cuda::std::__libcpp_is_constant_evaluated()) // This breaks some compilers due to excessive constant folding + if (!cuda::std::is_constant_evaluated()) // This breaks some compilers due to excessive constant folding { test, MoveOnly*>(); test>(); diff --git a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp index 45bced305b0..2c0c210fb08 100644 --- a/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/partial_sort_copy_comp.pass.cpp @@ -84,7 +84,7 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() assert(j == 75); test, random_access_iterator>(); - if (!cuda::std::__libcpp_is_constant_evaluated()) // This breaks some compilers due to excessive constant folding + if (!cuda::std::is_constant_evaluated()) // This breaks some compilers due to excessive constant folding { test, int*>(); test>(); @@ -92,7 +92,7 @@ __host__ __device__ TEST_CONSTEXPR_CXX14 bool test() } test, random_access_iterator>(); - if (!cuda::std::__libcpp_is_constant_evaluated()) // This breaks some compilers due to excessive constant folding + if (!cuda::std::is_constant_evaluated()) // This breaks some compilers due to excessive constant folding { test, MoveOnly*>(); test>(); diff --git a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/access.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/access.pass.cpp index c240c9759a9..64388533bbb 100644 --- a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/access.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/access.pass.cpp @@ -76,7 +76,7 @@ __host__ __device__ constexpr bool test() test(); test(); - if (!cuda::std::__libcpp_is_constant_evaluated()) + if (!cuda::std::is_constant_evaluated()) { test(); test(); diff --git a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/assign.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/assign.pass.cpp index 38fd504a48d..a2d12513c3f 100644 --- a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/assign.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/assign.pass.cpp @@ -234,7 +234,7 @@ __host__ __device__ constexpr bool test() test(); test(); - if (!cuda::std::__libcpp_is_constant_evaluated()) + if (!cuda::std::is_constant_evaluated()) { test(); test(); diff --git a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/assignment.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/assignment.pass.cpp index d905877373f..347ed9d777e 100644 --- a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/assignment.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/assignment.pass.cpp @@ -224,7 +224,7 @@ __host__ __device__ constexpr bool test() test(); test(); - if (!cuda::std::__libcpp_is_constant_evaluated()) + if (!cuda::std::is_constant_evaluated()) { test(); test(); diff --git a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/capacity.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/capacity.pass.cpp index 0b8280f9a43..f7b8a68031a 100644 --- a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/capacity.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/capacity.pass.cpp @@ -66,7 +66,7 @@ __host__ __device__ constexpr bool test() test(); test(); - if (!cuda::std::__libcpp_is_constant_evaluated()) + if (!cuda::std::is_constant_evaluated()) { test(); test(); diff --git a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/comparison.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/comparison.pass.cpp index 5f92e85755a..1a6f587c083 100644 --- a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/comparison.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/comparison.pass.cpp @@ -72,7 +72,7 @@ __host__ __device__ constexpr bool test() test(); test(); - if (!cuda::std::__libcpp_is_constant_evaluated()) + if (!cuda::std::is_constant_evaluated()) { test(); test(); diff --git a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/constructor.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/constructor.pass.cpp index 0b3e86bfc35..e30acffe9c1 100644 --- a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/constructor.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/constructor.pass.cpp @@ -283,7 +283,7 @@ __host__ __device__ constexpr void test() { test_default(); - if (!cuda::std::__libcpp_is_constant_evaluated()) + if (!cuda::std::is_constant_evaluated()) { test_copy_move(); test_size(); @@ -308,7 +308,7 @@ __host__ __device__ constexpr bool test() test(); // Due to reinterpret_cast within the destructor a on trivially destructible type cannot be constexpr at all - if (!cuda::std::__libcpp_is_constant_evaluated()) + if (!cuda::std::is_constant_evaluated()) { test(); } diff --git a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/emplace.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/emplace.pass.cpp index 3178c1b5b25..a581113b0d0 100644 --- a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/emplace.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/emplace.pass.cpp @@ -196,7 +196,7 @@ __host__ __device__ constexpr bool test() test(); test(); - if (!cuda::std::__libcpp_is_constant_evaluated()) + if (!cuda::std::is_constant_evaluated()) { test(); test(); diff --git a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/insert.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/insert.pass.cpp index cb9f5830d8b..9b80f98a67a 100644 --- a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/insert.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/insert.pass.cpp @@ -213,7 +213,7 @@ __host__ __device__ constexpr bool test() test(); test(); - if (!cuda::std::__libcpp_is_constant_evaluated()) + if (!cuda::std::is_constant_evaluated()) { test(); test(); diff --git a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/iterators.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/iterators.pass.cpp index 5b3590cc789..06029272c43 100644 --- a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/iterators.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/iterators.pass.cpp @@ -85,7 +85,7 @@ __host__ __device__ constexpr bool test() test(); test(); - if (!cuda::std::__libcpp_is_constant_evaluated()) + if (!cuda::std::is_constant_evaluated()) { test(); test(); diff --git a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/resize.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/resize.pass.cpp index 3500f591b2d..168cebbd6c2 100644 --- a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/resize.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/resize.pass.cpp @@ -231,7 +231,7 @@ __host__ __device__ constexpr bool test() test(); test(); - if (!cuda::std::__libcpp_is_constant_evaluated()) + if (!cuda::std::is_constant_evaluated()) { test(); test(); diff --git a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/swap.pass.cpp b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/swap.pass.cpp index 775d9ecb3d5..552246b888b 100644 --- a/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/swap.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/containers/sequences/inplace_vector/swap.pass.cpp @@ -62,7 +62,7 @@ __host__ __device__ constexpr bool test() test(); test(); - if (!cuda::std::__libcpp_is_constant_evaluated()) + if (!cuda::std::is_constant_evaluated()) { test(); test(); diff --git a/libcudacxx/test/libcudacxx/std/utilities/memory/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/memory/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.pass.cpp index 46e2a3fdd88..4d57f632361 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/memory/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/memory/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.pass.cpp @@ -67,7 +67,7 @@ __host__ __device__ TEST_CONSTEXPR_CXX23 void test_sfinae() static_assert(cuda::std::is_constructible::value, ""); static_assert(cuda::std::is_constructible::value, ""); static_assert(cuda::std::is_constructible::value, ""); - // FIXME: __libcpp_compressed_pair attempts to perform a move even though + // FIXME: __cccl_compressed_pair attempts to perform a move even though // it should only copy. // D d; // U u(nullptr, cuda::std::move(d)); @@ -149,7 +149,7 @@ __host__ __device__ TEST_CONSTEXPR_CXX23 void test_sfinae_runtime() static_assert(!cuda::std::is_constructible::value, ""); static_assert(!cuda::std::is_constructible::value, ""); static_assert(!cuda::std::is_constructible::value, ""); - // FIXME: __libcpp_compressed_pair attempts to perform a move even though + // FIXME: __cccl_compressed_pair attempts to perform a move even though // it should only copy. // D d; // U u(nullptr, cuda::std::move(d)); diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.const.eval/is_constant_evaluated.fail.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.const.eval/is_constant_evaluated.fail.cpp deleted file mode 100644 index edd04088205..00000000000 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.const.eval/is_constant_evaluated.fail.cpp +++ /dev/null @@ -1,28 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -// UNSUPPORTED: c++98, c++03 - -// - -#include -#include - -#include "test_macros.h" - -int main(int, char**) -{ -#ifndef _CCCL_BUILTIN_IS_CONSTANT_EVALUATED - // expected-error@+1 {{no member named 'is_constant_evaluated' in namespace 'std'}} - bool b = cuda::std::is_constant_evaluated(); -#else - // expected-error-re@+1 {{{{(static_assert|static assertion)}} failed}} - static_assert(!cuda::std::is_constant_evaluated(), ""); -#endif - return 0; -} diff --git a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp index e655fa3aa6f..c9e544789be 100644 --- a/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp +++ b/libcudacxx/test/libcudacxx/std/utilities/meta/meta.unary/meta.unary.prop/is_constructible.pass.cpp @@ -79,7 +79,7 @@ __host__ __device__ void test_is_constructible() #ifndef TEST_COMPILER_MSVC // The fallback SFINAE version doesn't work reliable with MSVC, and we don't // use it, so waive it. - static_assert((cuda::std::__libcpp_is_constructible::type::value), ""); + static_assert((cuda::std::__cccl_is_constructible::type::value), ""); #endif #if TEST_STD_VER > 2011 static_assert(cuda::std::is_constructible_v, ""); @@ -93,7 +93,7 @@ __host__ __device__ void test_is_constructible() #ifndef TEST_COMPILER_MSVC // The fallback SFINAE version doesn't work reliable with MSVC, and we don't // use it, so waive it. - static_assert((cuda::std::__libcpp_is_constructible::type::value), ""); + static_assert((cuda::std::__cccl_is_constructible::type::value), ""); #endif #if TEST_STD_VER > 2011 static_assert((cuda::std::is_constructible_v), ""); @@ -107,7 +107,7 @@ __host__ __device__ void test_is_constructible() #ifndef TEST_COMPILER_MSVC // The fallback SFINAE version doesn't work reliable with MSVC, and we don't // use it, so waive it. - static_assert((cuda::std::__libcpp_is_constructible::type::value), ""); + static_assert((cuda::std::__cccl_is_constructible::type::value), ""); #endif #if TEST_STD_VER > 2011 static_assert((cuda::std::is_constructible_v), ""); @@ -121,7 +121,7 @@ __host__ __device__ void test_is_constructible() #ifndef TEST_COMPILER_MSVC // The fallback SFINAE version doesn't work reliable with MSVC, and we don't // use it, so waive it. - static_assert((cuda::std::__libcpp_is_constructible::type::value), ""); + static_assert((cuda::std::__cccl_is_constructible::type::value), ""); #endif #if TEST_STD_VER > 2011 static_assert((cuda::std::is_constructible_v), ""); @@ -135,7 +135,7 @@ __host__ __device__ void test_is_not_constructible() #ifndef TEST_COMPILER_MSVC // The fallback SFINAE version doesn't work reliable with MSVC, and we don't // use it, so waive it. - static_assert((!cuda::std::__libcpp_is_constructible::type::value), ""); + static_assert((!cuda::std::__cccl_is_constructible::type::value), ""); #endif #if TEST_STD_VER > 2011 static_assert((!cuda::std::is_constructible_v), ""); @@ -149,7 +149,7 @@ __host__ __device__ void test_is_not_constructible() #if !defined(TEST_COMPILER_MSVC) && !(defined(TEST_COMPILER_CLANG) && __clang_major__ >= 16) // The fallback SFINAE version doesn't work reliable with MSVC, and we don't // use it, so waive it. - static_assert((!cuda::std::__libcpp_is_constructible::type::value), ""); + static_assert((!cuda::std::__cccl_is_constructible::type::value), ""); #endif #if TEST_STD_VER > 2011 static_assert((!cuda::std::is_constructible_v), ""); @@ -297,11 +297,11 @@ int main(int, char**) // FIXME Clang disallows this construction because it thinks that // 'static_cast(declval>())' is ill-formed. LIBCPP_STATIC_ASSERT( - clang_disallows_valid_static_cast_bug != cuda::std::__libcpp_is_constructible>::value, ""); + clang_disallows_valid_static_cast_bug != cuda::std::__cccl_is_constructible>::value, ""); ((void) clang_disallows_valid_static_cast_bug); // Prevent unused warning # else static_assert(clang_disallows_valid_static_cast_bug == false, ""); - LIBCPP_STATIC_ASSERT(cuda::std::__libcpp_is_constructible>::value, ""); + LIBCPP_STATIC_ASSERT(cuda::std::__cccl_is_constructible>::value, ""); # endif #endif @@ -309,7 +309,7 @@ int main(int, char**) #if defined(TEST_CLANG_VER) && !defined(TEST_COMPILER_NVCC) test_is_constructible>(); LIBCPP_STATIC_ASSERT( - clang_disallows_valid_static_cast_bug != cuda::std::__libcpp_is_constructible>::value, ""); + clang_disallows_valid_static_cast_bug != cuda::std::__cccl_is_constructible>::value, ""); static_assert(cuda::std::is_constructible>::value, ""); #elif defined(TEST_COMPILER_MSVC) && defined(TEST_COMPILER_NVCC) // FIXME NVCC and MSVC disagree about the validity of these tests, and give diff --git a/libcudacxx/test/support/check_assertion.h b/libcudacxx/test/support/check_assertion.h index 6def8f701e1..8d1a2de8da4 100644 --- a/libcudacxx/test/support/check_assertion.h +++ b/libcudacxx/test/support/check_assertion.h @@ -312,7 +312,7 @@ struct DeathTest std::string stderr_from_child_; }; -void std::__libcpp_verbose_abort(char const* format, ...) +void std::__cccl_verbose_abort(char const* format, ...) { assert(!GlobalMatcher().empty()); diff --git a/libcudacxx/test/support/test_macros.h b/libcudacxx/test/support/test_macros.h index c81987a0dc1..28915d10565 100644 --- a/libcudacxx/test/support/test_macros.h +++ b/libcudacxx/test/support/test_macros.h @@ -149,7 +149,7 @@ #if TEST_HAS_BUILTIN(__builtin_is_constant_evaluated) || _CCCL_COMPILER(GCC, >=, 9) \ || (_CCCL_COMPILER(MSVC) && _MSC_VER > 1924 && _CCCL_CUDACC_AT_LEAST(11, 3)) -# define TEST_IS_CONSTANT_EVALUATED() _CUDA_VSTD::__libcpp_is_constant_evaluated() +# define TEST_IS_CONSTANT_EVALUATED() cuda::std::is_constant_evaluated() #else # define TEST_IS_CONSTANT_EVALUATED() false #endif