ptx.h 1008 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. #ifndef BOOST_PREDEF_ARCHITECTURE_PTX_H
  8. #define BOOST_PREDEF_ARCHITECTURE_PTX_H
  9. #include <boost/predef/version_number.h>
  10. #include <boost/predef/make.h>
  11. /* tag::reference[]
  12. = `BOOST_ARCH_PTX`
  13. https://en.wikipedia.org/wiki/Parallel_Thread_Execution[PTX] architecture.
  14. [options="header"]
  15. |===
  16. | {predef_symbol} | {predef_version}
  17. | `+__CUDA_ARCH__+` | {predef_detection}
  18. | `+__CUDA_ARCH__+` | V.R.0
  19. |===
  20. */ // end::reference[]
  21. #define BOOST_ARCH_PTX BOOST_VERSION_NUMBER_NOT_AVAILABLE
  22. #if defined(__CUDA_ARCH__)
  23. # undef BOOST_ARCH_PTX
  24. # define BOOST_ARCH_PTX BOOST_PREDEF_MAKE_10_VR0(__CUDA_ARCH__)
  25. #endif
  26. #if BOOST_ARCH_PTX
  27. # define BOOST_ARCH_PTX_AVAILABLE
  28. #endif
  29. #define BOOST_ARCH_PTX_NAME "PTX"
  30. #endif
  31. #include <boost/predef/detail/test.h>
  32. BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_PTX,BOOST_ARCH_PTX_NAME)