Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:44:41

0001 //  (C) Copyright Eric Jourdanneau, Joel Falcou 2010
0002 //  Use, modification and distribution are subject to the 
0003 //  Boost Software License, Version 1.0. (See accompanying file 
0004 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0005 
0006 //  See http://www.boost.org for most recent version.
0007 
0008 //  NVIDIA CUDA C++ compiler setup
0009 
0010 #ifndef BOOST_COMPILER
0011 #  define BOOST_COMPILER "NVIDIA CUDA C++ Compiler"
0012 #endif
0013 
0014 #if defined(__CUDACC_VER_MAJOR__) && defined(__CUDACC_VER_MINOR__) && defined(__CUDACC_VER_BUILD__)
0015 #  define BOOST_CUDA_VERSION (__CUDACC_VER_MAJOR__ * 1000000 + __CUDACC_VER_MINOR__ * 10000 + __CUDACC_VER_BUILD__)
0016 #else
0017 // We don't really know what the CUDA version is, but it's definitely before 7.5:
0018 #  define BOOST_CUDA_VERSION 7000000
0019 #endif
0020 
0021 // NVIDIA Specific support
0022 // BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device
0023 #define BOOST_GPU_ENABLED __host__ __device__
0024 
0025 #if !defined(__clang__) || defined(__NVCC__)
0026 // A bug in version 7.0 of CUDA prevents use of variadic templates in some occasions
0027 // https://svn.boost.org/trac/boost/ticket/11897
0028 // This is fixed in 7.5. As the following version macro was introduced in 7.5 an existance
0029 // check is enough to detect versions < 7.5
0030 #if BOOST_CUDA_VERSION < 7050000
0031 #   define BOOST_NO_CXX11_VARIADIC_TEMPLATES
0032 #endif
0033 // The same bug is back again in 8.0:
0034 #if (BOOST_CUDA_VERSION > 8000000) && (BOOST_CUDA_VERSION < 8010000)
0035 #   define BOOST_NO_CXX11_VARIADIC_TEMPLATES
0036 #endif
0037 // CUDA (8.0) has no constexpr support in msvc mode:
0038 #if defined(_MSC_VER) && (BOOST_CUDA_VERSION < 9000000)
0039 #  define BOOST_NO_CXX11_CONSTEXPR
0040 #endif
0041 
0042 #endif
0043 
0044 #ifdef __CUDACC__
0045 //
0046 // When compiing .cu files, there's a bunch of stuff that doesn't work with msvc:
0047 //
0048 #if defined(_MSC_VER)
0049 #  define BOOST_NO_CXX14_DIGIT_SEPARATORS
0050 #  define BOOST_NO_CXX11_UNICODE_LITERALS
0051 #endif
0052 //
0053 // And this one effects the NVCC front end,
0054 // See https://svn.boost.org/trac/boost/ticket/13049
0055 //
0056 #if (BOOST_CUDA_VERSION >= 8000000) && (BOOST_CUDA_VERSION < 8010000)
0057 #  define BOOST_NO_CXX11_NOEXCEPT
0058 #endif
0059 
0060 #if !defined(__cpp_nontype_template_parameter_auto) || (__cpp_nontype_template_parameter_auto < 201606)
0061 #  define BOOST_NO_CXX17_AUTO_NONTYPE_TEMPLATE_PARAMS
0062 #endif
0063 
0064 #endif