Merge pull request #175 from boostorg/jzmaddock-patch-6-1

Update for CUDA version macro changes.
This commit is contained in:
jzmaddock
2017-08-22 18:55:15 +01:00
committed by GitHub

View File

@ -11,6 +11,13 @@
# define BOOST_COMPILER "NVIDIA CUDA C++ Compiler" # define BOOST_COMPILER "NVIDIA CUDA C++ Compiler"
#endif #endif
#if defined(__CUDACC_VER_MAJOR__) && defined(__CUDACC_VER_MINOR__) && defined(__CUDACC_VER_BUILD__)
# define BOOST_CUDA_VERSION __CUDACC_VER_MAJOR__ * 1000000 + __CUDACC_VER_MINOR__ * 10000 + __CUDACC_VER_BUILD__
#else
// We don't really know what the CUDA version is, but it's definitely before 7.5:
# define BOOST_CUDA_VERSION 7000000
#endif
// NVIDIA Specific support // NVIDIA Specific support
// BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device // BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device
#define BOOST_GPU_ENABLED __host__ __device__ #define BOOST_GPU_ENABLED __host__ __device__
@ -19,11 +26,11 @@
// https://svn.boost.org/trac/boost/ticket/11897 // 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 // 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 // check is enough to detect versions < 7.5
#if !defined(__CUDACC_VER__) || (__CUDACC_VER__ < 70500) #if BOOST_CUDA_VERSION < 7050000
# define BOOST_NO_CXX11_VARIADIC_TEMPLATES # define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#endif #endif
// The same bug is back again in 8.0: // The same bug is back again in 8.0:
#if (__CUDACC_VER__ > 80000) && (__CUDACC_VER__ < 80100) #if (BOOST_CUDA_VERSION > 8000000) && (BOOST_CUDA_VERSION < 8010000)
# define BOOST_NO_CXX11_VARIADIC_TEMPLATES # define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#endif #endif
// Most recent CUDA (8.0) has no constexpr support in msvc mode: // Most recent CUDA (8.0) has no constexpr support in msvc mode:
@ -43,7 +50,7 @@
// And this one effects the NVCC front end, // And this one effects the NVCC front end,
// See https://svn.boost.org/trac/boost/ticket/13049 // See https://svn.boost.org/trac/boost/ticket/13049
// //
#if (__CUDACC_VER__ >= 80000) && (__CUDACC_VER__ < 80100) #if (BOOST_CUDA_VERSION >= 8000000) && (BOOST_CUDA_VERSION < 8010000)
# define BOOST_NO_CXX11_NOEXCEPT # define BOOST_NO_CXX11_NOEXCEPT
#endif #endif