1 /*
2 Copyright Benjamin Worpitz 2018
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at
5 http://www.boost.org/LICENSE_1_0.txt)
6 */
7 
8 #ifndef BOOST_PREDEF_ARCHITECTURE_PTX_H
9 #define BOOST_PREDEF_ARCHITECTURE_PTX_H
10 
11 #include <boost/predef/version_number.h>
12 #include <boost/predef/make.h>
13 
14 /* tag::reference[]
15 = `BOOST_ARCH_PTX`
16 
17 https://en.wikipedia.org/wiki/Parallel_Thread_Execution[PTX] architecture.
18 
19 [options="header"]
20 |===
21 | {predef_symbol} | {predef_version}
22 
23 | `+__CUDA_ARCH__+` | {predef_detection}
24 
25 | `+__CUDA_ARCH__+` | V.R.0
26 |===
27 */ // end::reference[]
28 
29 #define BOOST_ARCH_PTX BOOST_VERSION_NUMBER_NOT_AVAILABLE
30 
31 #if defined(__CUDA_ARCH__)
32 #   undef BOOST_ARCH_PTX
33 #   define BOOST_ARCH_PTX BOOST_PREDEF_MAKE_10_VR0(__CUDA_ARCH__)
34 #endif
35 
36 #if BOOST_ARCH_PTX
37 #   define BOOST_ARCH_PTX_AVAILABLE
38 #endif
39 
40 #if BOOST_ARCH_PTX
41 #   undef BOOST_ARCH_WORD_BITS_64
42 #   define BOOST_ARCH_WORD_BITS_64 BOOST_VERSION_NUMBER_AVAILABLE
43 #endif
44 
45 #define BOOST_ARCH_PTX_NAME "PTX"
46 
47 #endif
48 
49 #include <boost/predef/detail/test.h>
50 BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_PTX,BOOST_ARCH_PTX_NAME)
51