]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/config/compiler/nvcc.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / config / compiler / nvcc.hpp
CommitLineData
7c673cae
FG
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)
5
6// See http://www.boost.org for most recent version.
7
8// NVIDIA CUDA C++ compiler setup
9
10#ifndef BOOST_COMPILER
11# define BOOST_COMPILER "NVIDIA CUDA C++ Compiler"
12#endif
13
b32b8144 14#if defined(__CUDACC_VER_MAJOR__) && defined(__CUDACC_VER_MINOR__) && defined(__CUDACC_VER_BUILD__)
92f5a8d4 15# define BOOST_CUDA_VERSION (__CUDACC_VER_MAJOR__ * 1000000 + __CUDACC_VER_MINOR__ * 10000 + __CUDACC_VER_BUILD__)
b32b8144
FG
16#else
17// We don't really know what the CUDA version is, but it's definitely before 7.5:
18# define BOOST_CUDA_VERSION 7000000
19#endif
20
7c673cae
FG
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__
24
1e59de90 25#if !defined(__clang__) || defined(__NVCC__)
7c673cae
FG
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
b32b8144 30#if BOOST_CUDA_VERSION < 7050000
7c673cae
FG
31# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
32#endif
33// The same bug is back again in 8.0:
b32b8144 34#if (BOOST_CUDA_VERSION > 8000000) && (BOOST_CUDA_VERSION < 8010000)
7c673cae
FG
35# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
36#endif
92f5a8d4
TL
37// CUDA (8.0) has no constexpr support in msvc mode:
38#if defined(_MSC_VER) && (BOOST_CUDA_VERSION < 9000000)
7c673cae
FG
39# define BOOST_NO_CXX11_CONSTEXPR
40#endif
b32b8144 41
1e59de90
TL
42#endif
43
b32b8144
FG
44#ifdef __CUDACC__
45//
46// When compiing .cu files, there's a bunch of stuff that doesn't work with msvc:
47//
48#if defined(_MSC_VER)
49# define BOOST_NO_CXX14_DIGIT_SEPARATORS
50# define BOOST_NO_CXX11_UNICODE_LITERALS
51#endif
52//
53// And this one effects the NVCC front end,
54// See https://svn.boost.org/trac/boost/ticket/13049
55//
56#if (BOOST_CUDA_VERSION >= 8000000) && (BOOST_CUDA_VERSION < 8010000)
57# define BOOST_NO_CXX11_NOEXCEPT
58#endif
59
60#endif
61