summaryrefslogtreecommitdiff
path: root/boost/config/compiler
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:38:45 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:39:52 +0900
commit5cde13f21d36c7224b0e13d11c4b49379ae5210d (patch)
treee8269ac85a4b0f7d416e2565fa4f451b5cb41351 /boost/config/compiler
parentd9ec475d945d3035377a0d89ed42e382d8988891 (diff)
downloadboost-5cde13f21d36c7224b0e13d11c4b49379ae5210d.tar.gz
boost-5cde13f21d36c7224b0e13d11c4b49379ae5210d.tar.bz2
boost-5cde13f21d36c7224b0e13d11c4b49379ae5210d.zip
Imported Upstream version 1.61.0
Change-Id: I96a1f878d1e6164f01e9aadd5147f38fca448d90 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/config/compiler')
-rw-r--r--boost/config/compiler/clang.hpp15
-rw-r--r--boost/config/compiler/gcc.hpp21
-rw-r--r--boost/config/compiler/intel.hpp10
-rw-r--r--boost/config/compiler/nvcc.hpp8
4 files changed, 46 insertions, 8 deletions
diff --git a/boost/config/compiler/clang.hpp b/boost/config/compiler/clang.hpp
index 5481e5ee62..01355bb7d5 100644
--- a/boost/config/compiler/clang.hpp
+++ b/boost/config/compiler/clang.hpp
@@ -57,16 +57,25 @@
#define BOOST_HAS_LONG_LONG
//
-// We disable this if the compiler is really nvcc as it
-// doesn't actually support __int128 as of CUDA_VERSION=5000
+// We disable this if the compiler is really nvcc with C++03 as it
+// doesn't actually support __int128 as of CUDA_VERSION=7500
// even though it defines __SIZEOF_INT128__.
// See https://svn.boost.org/trac/boost/ticket/10418
+// https://svn.boost.org/trac/boost/ticket/11852
// Only re-enable this for nvcc if you're absolutely sure
// of the circumstances under which it's supported.
// Similarly __SIZEOF_INT128__ is defined when targetting msvc
// compatibility even though the required support functions are absent.
//
-#if defined(__SIZEOF_INT128__) && !defined(__CUDACC__) && !defined(_MSC_VER)
+#if defined(__CUDACC__)
+# if defined(BOOST_GCC_CXX11)
+# define BOOST_NVCC_CXX11
+# else
+# define BOOST_NVCC_CXX03
+# endif
+#endif
+
+#if defined(__SIZEOF_INT128__) && !defined(BOOST_NVCC_CXX03) && !defined(_MSC_VER)
# define BOOST_HAS_INT128
#endif
diff --git a/boost/config/compiler/gcc.hpp b/boost/config/compiler/gcc.hpp
index d9dd59dc5f..fbd3dd9c19 100644
--- a/boost/config/compiler/gcc.hpp
+++ b/boost/config/compiler/gcc.hpp
@@ -133,14 +133,23 @@
//
// Recent GCC versions have __int128 when in 64-bit mode.
//
-// We disable this if the compiler is really nvcc as it
-// doesn't actually support __int128 as of CUDA_VERSION=5000
+// We disable this if the compiler is really nvcc with C++03 as it
+// doesn't actually support __int128 as of CUDA_VERSION=7500
// even though it defines __SIZEOF_INT128__.
// See https://svn.boost.org/trac/boost/ticket/8048
+// https://svn.boost.org/trac/boost/ticket/11852
// Only re-enable this for nvcc if you're absolutely sure
// of the circumstances under which it's supported:
//
-#if defined(__SIZEOF_INT128__) && !defined(__CUDACC__)
+#if defined(__CUDACC__)
+# if defined(BOOST_GCC_CXX11)
+# define BOOST_NVCC_CXX11
+# else
+# define BOOST_NVCC_CXX03
+# endif
+#endif
+
+#if defined(__SIZEOF_INT128__) && !defined(BOOST_NVCC_CXX03)
# define BOOST_HAS_INT128
#endif
//
@@ -148,12 +157,16 @@
// include a std lib header to detect this - not ideal, but we'll
// be including <cstddef> later anyway when we select the std lib.
//
+// Nevertheless, as of CUDA 7.5, using __float128 with the host
+// compiler in pre-C++11 mode is still not supported.
+// See https://svn.boost.org/trac/boost/ticket/11852
+//
#ifdef __cplusplus
#include <cstddef>
#else
#include <stddef.h>
#endif
-#if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__)
+#if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__) && !defined(BOOST_NVCC_CXX03)
# define BOOST_HAS_FLOAT128
#endif
diff --git a/boost/config/compiler/intel.hpp b/boost/config/compiler/intel.hpp
index 7789b94464..88ac023acc 100644
--- a/boost/config/compiler/intel.hpp
+++ b/boost/config/compiler/intel.hpp
@@ -514,7 +514,15 @@ template<> struct assert_intrinsic_wchar_t<unsigned short> {};
# define BOOST_HAS_STDINT_H
#endif
-#if defined(__LP64__) && defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1310) && !defined(__CUDACC__)
+#if defined(__CUDACC__)
+# if defined(BOOST_GCC_CXX11)
+# define BOOST_NVCC_CXX11
+# else
+# define BOOST_NVCC_CXX03
+# endif
+#endif
+
+#if defined(__LP64__) && defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1310) && !defined(BOOST_NVCC_CXX03)
# define BOOST_HAS_INT128
#endif
diff --git a/boost/config/compiler/nvcc.hpp b/boost/config/compiler/nvcc.hpp
index bbe81f6ee5..5a047070af 100644
--- a/boost/config/compiler/nvcc.hpp
+++ b/boost/config/compiler/nvcc.hpp
@@ -14,3 +14,11 @@
// NVIDIA Specific support
// BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device
#define BOOST_GPU_ENABLED __host__ __device__
+
+// A bug in version 7.0 of CUDA prevents use of variadic templates in some occasions
+// https://svn.boost.org/trac/boost/ticket/11897
+// This is fixed in 7.5. As the following version macro was introduced in 7.5 an existance
+// check is enough to detect versions < 7.5
+#if !defined(__CUDACC_VER__) || (__CUDACC_VER__ < 70500)
+# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#endif