diff --git a/libcudacxx/include/cuda/std/__cmath/nvbf16.h b/libcudacxx/include/cuda/std/__cmath/nvbf16.h index 762639eb49d..db44e27fe2b 100644 --- a/libcudacxx/include/cuda/std/__cmath/nvbf16.h +++ b/libcudacxx/include/cuda/std/__cmath/nvbf16.h @@ -93,7 +93,7 @@ _LIBCUDACXX_HIDE_FROM_ABI bool __constexpr_isnan(__nv_bfloat16 __x) noexcept _LIBCUDACXX_HIDE_FROM_ABI bool isnan(__nv_bfloat16 __v) { - return __constexpr_isnan(__v); + return _CUDA_VSTD::__constexpr_isnan(__v); } _LIBCUDACXX_HIDE_FROM_ABI bool __constexpr_isinf(__nv_bfloat16 __x) noexcept @@ -108,17 +108,17 @@ _LIBCUDACXX_HIDE_FROM_ABI bool __constexpr_isinf(__nv_bfloat16 __x) noexcept _LIBCUDACXX_HIDE_FROM_ABI bool isinf(__nv_bfloat16 __v) { - return __constexpr_isinf(__v); + return _CUDA_VSTD::__constexpr_isinf(__v); } _LIBCUDACXX_HIDE_FROM_ABI bool __constexpr_isfinite(__nv_bfloat16 __x) noexcept { - return !__constexpr_isnan(__x) && !__constexpr_isinf(__x); + return !_CUDA_VSTD::__constexpr_isnan(__x) && !_CUDA_VSTD::__constexpr_isinf(__x); } _LIBCUDACXX_HIDE_FROM_ABI bool isfinite(__nv_bfloat16 __v) { - return __constexpr_isfinite(__v); + return _CUDA_VSTD::__constexpr_isfinite(__v); } _LIBCUDACXX_HIDE_FROM_ABI __nv_bfloat16 __constexpr_copysign(__nv_bfloat16 __x, __nv_bfloat16 __y) noexcept @@ -128,7 +128,7 @@ _LIBCUDACXX_HIDE_FROM_ABI __nv_bfloat16 __constexpr_copysign(__nv_bfloat16 __x, _LIBCUDACXX_HIDE_FROM_ABI __nv_bfloat16 copysign(__nv_bfloat16 __x, __nv_bfloat16 __y) { - return __constexpr_copysign(__x, __y); + return _CUDA_VSTD::__constexpr_copysign(__x, __y); } _LIBCUDACXX_HIDE_FROM_ABI __nv_bfloat16 __constexpr_fabs(__nv_bfloat16 __x) noexcept @@ -138,12 +138,12 @@ _LIBCUDACXX_HIDE_FROM_ABI __nv_bfloat16 __constexpr_fabs(__nv_bfloat16 __x) noex _LIBCUDACXX_HIDE_FROM_ABI __nv_bfloat16 fabs(__nv_bfloat16 __x) { - return __constexpr_fabs(__x); + return _CUDA_VSTD::__constexpr_fabs(__x); } _LIBCUDACXX_HIDE_FROM_ABI __nv_bfloat16 abs(__nv_bfloat16 __x) { - return __constexpr_fabs(__x); + return _CUDA_VSTD::__constexpr_fabs(__x); } _LIBCUDACXX_HIDE_FROM_ABI __nv_bfloat16 __constexpr_fmax(__nv_bfloat16 __x, __nv_bfloat16 __y) noexcept diff --git a/libcudacxx/include/cuda/std/__cmath/nvfp16.h b/libcudacxx/include/cuda/std/__cmath/nvfp16.h index b775db7bf4d..de174de4951 100644 --- a/libcudacxx/include/cuda/std/__cmath/nvfp16.h +++ b/libcudacxx/include/cuda/std/__cmath/nvfp16.h @@ -180,7 +180,7 @@ _LIBCUDACXX_HIDE_FROM_ABI bool __constexpr_isnan(__half __x) noexcept _LIBCUDACXX_HIDE_FROM_ABI bool isnan(__half __v) { - return __constexpr_isnan(__v); + return _CUDA_VSTD::__constexpr_isnan(__v); } _LIBCUDACXX_HIDE_FROM_ABI bool __constexpr_isinf(__half __x) noexcept @@ -195,17 +195,17 @@ _LIBCUDACXX_HIDE_FROM_ABI bool __constexpr_isinf(__half __x) noexcept _LIBCUDACXX_HIDE_FROM_ABI bool isinf(__half __v) { - return __constexpr_isinf(__v); + return _CUDA_VSTD::__constexpr_isinf(__v); } _LIBCUDACXX_HIDE_FROM_ABI bool __constexpr_isfinite(__half __x) noexcept { - return !__constexpr_isnan(__x) && !__constexpr_isinf(__x); + return !_CUDA_VSTD::__constexpr_isnan(__x) && !_CUDA_VSTD::__constexpr_isinf(__x); } _LIBCUDACXX_HIDE_FROM_ABI bool isfinite(__half __v) { - return __constexpr_isfinite(__v); + return _CUDA_VSTD::__constexpr_isfinite(__v); } _LIBCUDACXX_HIDE_FROM_ABI __half __constexpr_copysign(__half __x, __half __y) noexcept @@ -215,7 +215,7 @@ _LIBCUDACXX_HIDE_FROM_ABI __half __constexpr_copysign(__half __x, __half __y) no _LIBCUDACXX_HIDE_FROM_ABI __half copysign(__half __x, __half __y) { - return __constexpr_copysign(__x, __y); + return _CUDA_VSTD::__constexpr_copysign(__x, __y); } _LIBCUDACXX_HIDE_FROM_ABI __half __constexpr_fabs(__half __x) noexcept @@ -225,12 +225,12 @@ _LIBCUDACXX_HIDE_FROM_ABI __half __constexpr_fabs(__half __x) noexcept _LIBCUDACXX_HIDE_FROM_ABI __half fabs(__half __x) { - return __constexpr_fabs(__x); + return _CUDA_VSTD::__constexpr_fabs(__x); } _LIBCUDACXX_HIDE_FROM_ABI __half abs(__half __x) { - return __constexpr_fabs(__x); + return _CUDA_VSTD::__constexpr_fabs(__x); } _LIBCUDACXX_HIDE_FROM_ABI __half __constexpr_fmax(__half __x, __half __y) noexcept diff --git a/libcudacxx/include/cuda/std/detail/libcxx/include/cmath b/libcudacxx/include/cuda/std/detail/libcxx/include/cmath index 60004cbde0d..3f7b42b8e97 100644 --- a/libcudacxx/include/cuda/std/detail/libcxx/include/cmath +++ b/libcudacxx/include/cuda/std/detail/libcxx/include/cmath @@ -588,16 +588,16 @@ using ::truncl; #if _CCCL_STD_VER > 2014 && !defined(__cuda_std__) _LIBCUDACXX_HIDE_FROM_ABI float hypot(float x, float y, float z) { - return sqrt(x * x + y * y + z * z); + return _CUDA_VSTD::sqrt(x * x + y * y + z * z); } _LIBCUDACXX_HIDE_FROM_ABI double hypot(double x, double y, double z) { - return sqrt(x * x + y * y + z * z); + return _CUDA_VSTD::sqrt(x * x + y * y + z * z); } # ifdef _LIBCUDACXX_HAS_COMPLEX_LONG_DOUBLE _LIBCUDACXX_HIDE_FROM_ABI long double hypot(long double x, long double y, long double z) { - return sqrt(x * x + y * y + z * z); + return _CUDA_VSTD::sqrt(x * x + y * y + z * z); } # endif @@ -611,7 +611,7 @@ hypot(_A1 __lcpp_x, _A2 __lcpp_y, _A3 __lcpp_z) noexcept static_assert( (!(is_same<_A1, __result_type>::value && is_same<_A2, __result_type>::value && is_same<_A3, __result_type>::value)), ""); - return ::hypot((__result_type) __lcpp_x, (__result_type) __lcpp_y, (__result_type) __lcpp_z); + return _CUDA_VSTD::hypot((__result_type) __lcpp_x, (__result_type) __lcpp_y, (__result_type) __lcpp_z); } #endif @@ -763,11 +763,11 @@ _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14_COMPLEX float __constexpr_fmax(f if (_CCCL_BUILTIN_IS_CONSTANT_EVALUATED()) # endif // defined(_CCCL_COMPILER_ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) { - if (__constexpr_isnan(__x)) + if (_CUDA_VSTD::__constexpr_isnan(__x)) { return __y; } - if (__constexpr_isnan(__y)) + if (_CUDA_VSTD::__constexpr_isnan(__y)) { return __x; } @@ -786,11 +786,11 @@ _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14_COMPLEX double __constexpr_fmax( if (_CCCL_BUILTIN_IS_CONSTANT_EVALUATED()) # endif // defined(_CCCL_COMPILER_ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) { - if (__constexpr_isnan(__x)) + if (_CUDA_VSTD::__constexpr_isnan(__x)) { return __y; } - if (__constexpr_isnan(__y)) + if (_CUDA_VSTD::__constexpr_isnan(__y)) { return __x; } @@ -810,11 +810,11 @@ __constexpr_fmax(long double __x, long double __y) noexcept if (_CCCL_BUILTIN_IS_CONSTANT_EVALUATED()) # endif // defined(_CCCL_COMPILER_ICC) && _NV_ISEMPTY(_CCCL_CONSTEXPR_CXX14_COMPLEX) { - if (__constexpr_isnan(__x)) + if (_CUDA_VSTD::__constexpr_isnan(__x)) { return __y; } - if (__constexpr_isnan(__y)) + if (_CUDA_VSTD::__constexpr_isnan(__y)) { return __x; } @@ -851,17 +851,17 @@ _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14_COMPLEX _Tp __constexpr_logb(_Tp return -numeric_limits<_Tp>::infinity(); } - if (__constexpr_isinf(__x)) + if (_CUDA_VSTD::__constexpr_isinf(__x)) { return numeric_limits<_Tp>::infinity(); } - if (__constexpr_isnan(__x)) + if (_CUDA_VSTD::__constexpr_isnan(__x)) { return numeric_limits<_Tp>::quiet_NaN(); } - __x = __constexpr_fabs(__x); + __x = _CUDA_VSTD::__constexpr_fabs(__x); unsigned long long __exp = 0; while (__x >= _Tp(numeric_limits<_Tp>::radix)) { @@ -913,7 +913,7 @@ _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14_COMPLEX _Tp __constexpr_scalbn(_ return __x; } - if (__constexpr_isinf(__x)) + if (_CUDA_VSTD::__constexpr_isinf(__x)) { return __x; } @@ -923,7 +923,7 @@ _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14_COMPLEX _Tp __constexpr_scalbn(_ return __x; } - if (__constexpr_isnan(__x)) + if (_CUDA_VSTD::__constexpr_isnan(__x)) { return numeric_limits<_Tp>::quiet_NaN(); }