ptx.h 987 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. /*`
  12. [heading `BOOST_ARCH_PTX`]
  13. [@https://en.wikipedia.org/wiki/Parallel_Thread_Execution PTX] architecture.
  14. [table
  15. [[__predef_symbol__] [__predef_version__]]
  16. [[`__CUDA_ARCH__`] [__predef_detection__]]
  17. [[`__CUDA_ARCH__`] [V.R.0]]
  18. ]
  19. */
  20. #define BOOST_ARCH_PTX BOOST_VERSION_NUMBER_NOT_AVAILABLE
  21. #if defined(__CUDA_ARCH__)
  22. # undef BOOST_ARCH_PTX
  23. # define BOOST_ARCH_PTX BOOST_PREDEF_MAKE_10_VR0(__CUDA_ARCH__)
  24. #endif
  25. #if BOOST_ARCH_PTX
  26. # define BOOST_ARCH_PTX_AVAILABLE
  27. #endif
  28. #define BOOST_ARCH_PTX_NAME "PTX"
  29. #endif
  30. #include <boost/predef/detail/test.h>
  31. BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_PTX,BOOST_ARCH_PTX_NAME)