blob: 3c35ef7cd84a5b308a9d577d5e3574a93e5afcc2 [file] [log] [blame]
Brian Silverman44c68b12018-08-04 23:56:44 -07001/*
2Copyright Benjamin Worpitz 2018
3Distributed under the Boost Software License, Version 1.0.
4(See accompanying file LICENSE_1_0.txt or copy at
5http://www.boost.org/LICENSE_1_0.txt)
6*/
7
8#ifndef BOOST_PREDEF_COMPILER_NVCC_H
9#define BOOST_PREDEF_COMPILER_NVCC_H
10
11#include <boost/predef/version_number.h>
12#include <boost/predef/make.h>
13
14/*`
15[heading `BOOST_COMP_NVCC`]
16
17[@https://en.wikipedia.org/wiki/NVIDIA_CUDA_Compiler NVCC] compiler.
18Version number available as major, minor, and patch beginning with version 7.5.
19
20[table
21 [[__predef_symbol__] [__predef_version__]]
22
23 [[`__NVCC__`] [__predef_detection__]]
24
25 [[`__CUDACC_VER_MAJOR__`, `__CUDACC_VER_MINOR__`, `__CUDACC_VER_BUILD__`] [V.R.P]]
26 ]
27 */
28
29#define BOOST_COMP_NVCC BOOST_VERSION_NUMBER_NOT_AVAILABLE
30
31#if defined(__NVCC__)
32# if !defined(__CUDACC_VER_MAJOR__) || !defined(__CUDACC_VER_MINOR__) || !defined(__CUDACC_VER_BUILD__)
33# define BOOST_COMP_NVCC_DETECTION BOOST_VERSION_NUMBER_AVAILABLE
34# else
35# define BOOST_COMP_NVCC_DETECTION BOOST_VERSION_NUMBER(__CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, __CUDACC_VER_BUILD__)
36# endif
37#endif
38
39#ifdef BOOST_COMP_NVCC_DETECTION
40# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED)
41# define BOOST_COMP_NVCC_EMULATED BOOST_COMP_NVCC_DETECTION
42# else
43# undef BOOST_COMP_NVCC
44# define BOOST_COMP_NVCC BOOST_COMP_NVCC_DETECTION
45# endif
46# define BOOST_COMP_NVCC_AVAILABLE
47# include <boost/predef/detail/comp_detected.h>
48#endif
49
50#define BOOST_COMP_NVCC_NAME "NVCC"
51
52#endif
53
54#include <boost/predef/detail/test.h>
55BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_NVCC,BOOST_COMP_NVCC_NAME)
56
57#ifdef BOOST_COMP_NVCC_EMULATED
58#include <boost/predef/detail/test.h>
59BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_NVCC_EMULATED,BOOST_COMP_NVCC_NAME)
60#endif