summaryrefslogtreecommitdiffstats
path: root/libcxx/include/cmath
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2016-11-15 19:15:57 +0000
committerJustin Lebar <jlebar@google.com>2016-11-15 19:15:57 +0000
commit2d3482287bf3b5e118c05cc0cb8d5962858f49ab (patch)
tree9a73f377639937ddea672cca327a5f3e8e414814 /libcxx/include/cmath
parent926d516179e0a5c5582a4b72f0535da636523e1b (diff)
downloadbcm5719-llvm-2d3482287bf3b5e118c05cc0cb8d5962858f49ab.tar.gz
bcm5719-llvm-2d3482287bf3b5e118c05cc0cb8d5962858f49ab.zip
[CUDA] Mark __libcpp_{isnan,isinf,isfinite} as constexpr.
Summary: This makes these functions available on host and device, which is necessary to compile <complex> for the device. Reviewers: hfinkel, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25403 llvm-svn: 287012
Diffstat (limited to 'libcxx/include/cmath')
-rw-r--r--libcxx/include/cmath12
1 files changed, 6 insertions, 6 deletions
diff --git a/libcxx/include/cmath b/libcxx/include/cmath
index 725515ea4f3..724935623db 100644
--- a/libcxx/include/cmath
+++ b/libcxx/include/cmath
@@ -554,7 +554,7 @@ hypot(_A1 __lcpp_x, _A2 __lcpp_y, _A3 __lcpp_z) _NOEXCEPT
template <class _A1>
_LIBCPP_ALWAYS_INLINE
-typename enable_if<is_floating_point<_A1>::value, bool>::type
+_LIBCPP_CONSTEXPR typename enable_if<is_floating_point<_A1>::value, bool>::type
__libcpp_isnan(_A1 __lcpp_x) _NOEXCEPT
{
#if __has_builtin(__builtin_isnan)
@@ -566,7 +566,7 @@ __libcpp_isnan(_A1 __lcpp_x) _NOEXCEPT
template <class _A1>
_LIBCPP_ALWAYS_INLINE
-typename enable_if<!is_floating_point<_A1>::value, bool>::type
+_LIBCPP_CONSTEXPR typename enable_if<!is_floating_point<_A1>::value, bool>::type
__libcpp_isnan(_A1 __lcpp_x) _NOEXCEPT
{
return isnan(__lcpp_x);
@@ -574,7 +574,7 @@ __libcpp_isnan(_A1 __lcpp_x) _NOEXCEPT
template <class _A1>
_LIBCPP_ALWAYS_INLINE
-typename enable_if<is_floating_point<_A1>::value, bool>::type
+_LIBCPP_CONSTEXPR typename enable_if<is_floating_point<_A1>::value, bool>::type
__libcpp_isinf(_A1 __lcpp_x) _NOEXCEPT
{
#if __has_builtin(__builtin_isinf)
@@ -586,7 +586,7 @@ __libcpp_isinf(_A1 __lcpp_x) _NOEXCEPT
template <class _A1>
_LIBCPP_ALWAYS_INLINE
-typename enable_if<!is_floating_point<_A1>::value, bool>::type
+_LIBCPP_CONSTEXPR typename enable_if<!is_floating_point<_A1>::value, bool>::type
__libcpp_isinf(_A1 __lcpp_x) _NOEXCEPT
{
return isinf(__lcpp_x);
@@ -594,7 +594,7 @@ __libcpp_isinf(_A1 __lcpp_x) _NOEXCEPT
template <class _A1>
_LIBCPP_ALWAYS_INLINE
-typename enable_if<is_floating_point<_A1>::value, bool>::type
+_LIBCPP_CONSTEXPR typename enable_if<is_floating_point<_A1>::value, bool>::type
__libcpp_isfinite(_A1 __lcpp_x) _NOEXCEPT
{
#if __has_builtin(__builtin_isfinite)
@@ -606,7 +606,7 @@ __libcpp_isfinite(_A1 __lcpp_x) _NOEXCEPT
template <class _A1>
_LIBCPP_ALWAYS_INLINE
-typename enable_if<!is_floating_point<_A1>::value, bool>::type
+_LIBCPP_CONSTEXPR typename enable_if<!is_floating_point<_A1>::value, bool>::type
__libcpp_isfinite(_A1 __lcpp_x) _NOEXCEPT
{
return isfinite(__lcpp_x);
OpenPOWER on IntegriCloud