1 // (C) Copyright Eric Jourdanneau, Joel Falcou 2010
2 // Use, modification and distribution are subject to the
3 // Boost Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 // See http://www.boost.org for most recent version.
8 // NVIDIA CUDA C++ compiler setup
10 #ifndef BOOST_COMPILER
11 # define BOOST_COMPILER "NVIDIA CUDA C++ Compiler"
14 #if defined(__CUDACC_VER_MAJOR__) && defined(__CUDACC_VER_MINOR__) && defined(__CUDACC_VER_BUILD__)
15 # define BOOST_CUDA_VERSION (__CUDACC_VER_MAJOR__ * 1000000 + __CUDACC_VER_MINOR__ * 10000 + __CUDACC_VER_BUILD__)
17 // We don't really know what the CUDA version is, but it's definitely before 7.5:
18 # define BOOST_CUDA_VERSION 7000000
21 // NVIDIA Specific support
22 // BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device
23 #define BOOST_GPU_ENABLED __host__ __device__
25 #if !defined(__clang__) || defined(__NVCC__)
26 // A bug in version 7.0 of CUDA prevents use of variadic templates in some occasions
27 // https://svn.boost.org/trac/boost/ticket/11897
28 // This is fixed in 7.5. As the following version macro was introduced in 7.5 an existance
29 // check is enough to detect versions < 7.5
30 #if BOOST_CUDA_VERSION < 7050000
31 # define BOOST_NO_CXX11_VARIADIC_TEMPLATES
33 // The same bug is back again in 8.0:
34 #if (BOOST_CUDA_VERSION > 8000000) && (BOOST_CUDA_VERSION < 8010000)
35 # define BOOST_NO_CXX11_VARIADIC_TEMPLATES
37 // CUDA (8.0) has no constexpr support in msvc mode:
38 #if defined(_MSC_VER) && (BOOST_CUDA_VERSION < 9000000)
39 # define BOOST_NO_CXX11_CONSTEXPR
46 // When compiing .cu files, there's a bunch of stuff that doesn't work with msvc:
49 # define BOOST_NO_CXX14_DIGIT_SEPARATORS
50 # define BOOST_NO_CXX11_UNICODE_LITERALS
53 // And this one effects the NVCC front end,
54 // See https://svn.boost.org/trac/boost/ticket/13049
56 #if (BOOST_CUDA_VERSION >= 8000000) && (BOOST_CUDA_VERSION < 8010000)
57 # define BOOST_NO_CXX11_NOEXCEPT