1/*
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_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
17https://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#define BOOST_ARCH_PTX_NAME "PTX"
41
42#endif
43
44#include <boost/predef/detail/test.h>
45BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_PTX,BOOST_ARCH_PTX_NAME)
46

source code of include/boost/predef/architecture/ptx.h