arm.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. Copyright Charly Chevalier 2015
  3. Copyright Joel Falcou 2015
  4. Distributed under the Boost Software License, Version 1.0.
  5. (See accompanying file LICENSE_1_0.txt or copy at
  6. http://www.boost.org/LICENSE_1_0.txt)
  7. */
  8. #ifndef BOOST_PREDEF_HARDWARE_SIMD_ARM_H
  9. #define BOOST_PREDEF_HARDWARE_SIMD_ARM_H
  10. #include <boost/predef/version_number.h>
  11. #include <boost/predef/hardware/simd/arm/versions.h>
  12. /* tag::reference[]
  13. = `BOOST_HW_SIMD_ARM`
  14. The SIMD extension for ARM (*if detected*).
  15. Version number depends on the most recent detected extension.
  16. [options="header"]
  17. |===
  18. | {predef_symbol} | {predef_version}
  19. | `+__ARM_NEON__+` | {predef_detection}
  20. | `+__aarch64__+` | {predef_detection}
  21. | `+_M_ARM+` | {predef_detection}
  22. | `+_M_ARM64+` | {predef_detection}
  23. |===
  24. [options="header"]
  25. |===
  26. | {predef_symbol} | {predef_version}
  27. | `+__ARM_NEON__+` | BOOST_HW_SIMD_ARM_NEON_VERSION
  28. | `+__aarch64__+` | BOOST_HW_SIMD_ARM_NEON_VERSION
  29. | `+_M_ARM+` | BOOST_HW_SIMD_ARM_NEON_VERSION
  30. | `+_M_ARM64+` | BOOST_HW_SIMD_ARM_NEON_VERSION
  31. |===
  32. */ // end::reference[]
  33. #define BOOST_HW_SIMD_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE
  34. #undef BOOST_HW_SIMD_ARM
  35. #if !defined(BOOST_HW_SIMD_ARM) && (defined(__ARM_NEON__) || defined(__aarch64__) || defined (_M_ARM) || defined (_M_ARM64))
  36. # define BOOST_HW_SIMD_ARM BOOST_HW_SIMD_ARM_NEON_VERSION
  37. #endif
  38. #if !defined(BOOST_HW_SIMD_ARM)
  39. # define BOOST_HW_SIMD_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE
  40. #else
  41. # define BOOST_HW_SIMD_ARM_AVAILABLE
  42. #endif
  43. #define BOOST_HW_SIMD_ARM_NAME "ARM SIMD"
  44. #endif
  45. #include <boost/predef/detail/test.h>
  46. BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_ARM, BOOST_HW_SIMD_ARM_NAME)