arm.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. /*`
  13. [heading `BOOST_HW_SIMD_ARM`]
  14. The SIMD extension for ARM (*if detected*).
  15. Version number depends on the most recent detected extension.
  16. [table
  17. [[__predef_symbol__] [__predef_version__]]
  18. [[`__ARM_NEON__`] [__predef_detection__]]
  19. [[`__aarch64__`] [__predef_detection__]]
  20. [[`_M_ARM`] [__predef_detection__]]
  21. ]
  22. [table
  23. [[__predef_symbol__] [__predef_version__]]
  24. [[`__ARM_NEON__`] [BOOST_HW_SIMD_ARM_NEON_VERSION]]
  25. [[`__aarch64__`] [BOOST_HW_SIMD_ARM_NEON_VERSION]]
  26. [[`_M_ARM`] [BOOST_HW_SIMD_ARM_NEON_VERSION]]
  27. ]
  28. */
  29. #define BOOST_HW_SIMD_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE
  30. #undef BOOST_HW_SIMD_ARM
  31. #if !defined(BOOST_HW_SIMD_ARM) && (defined(__ARM_NEON__) || defined(__aarch64__) || defined (_M_ARM))
  32. # define BOOST_HW_SIMD_ARM BOOST_HW_SIMD_ARM_NEON_VERSION
  33. #endif
  34. #if !defined(BOOST_HW_SIMD_ARM)
  35. # define BOOST_HW_SIMD_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE
  36. #else
  37. # define BOOST_HW_SIMD_ARM_AVAILABLE
  38. #endif
  39. #define BOOST_HW_SIMD_ARM_NAME "ARM SIMD"
  40. #endif
  41. #include <boost/predef/detail/test.h>
  42. BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_ARM, BOOST_HW_SIMD_ARM_NAME)