arm.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. [[`_M_ARM64`] [__predef_detection__]]
  22. ]
  23. [table
  24. [[__predef_symbol__] [__predef_version__]]
  25. [[`__ARM_NEON__`] [BOOST_HW_SIMD_ARM_NEON_VERSION]]
  26. [[`__aarch64__`] [BOOST_HW_SIMD_ARM_NEON_VERSION]]
  27. [[`_M_ARM`] [BOOST_HW_SIMD_ARM_NEON_VERSION]]
  28. [[`_M_ARM64`] [BOOST_HW_SIMD_ARM_NEON_VERSION]]
  29. ]
  30. */
  31. #define BOOST_HW_SIMD_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE
  32. #undef BOOST_HW_SIMD_ARM
  33. #if !defined(BOOST_HW_SIMD_ARM) && (defined(__ARM_NEON__) || defined(__aarch64__) || defined (_M_ARM) || defined (_M_ARM64))
  34. # define BOOST_HW_SIMD_ARM BOOST_HW_SIMD_ARM_NEON_VERSION
  35. #endif
  36. #if !defined(BOOST_HW_SIMD_ARM)
  37. # define BOOST_HW_SIMD_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE
  38. #else
  39. # define BOOST_HW_SIMD_ARM_AVAILABLE
  40. #endif
  41. #define BOOST_HW_SIMD_ARM_NAME "ARM SIMD"
  42. #endif
  43. #include <boost/predef/detail/test.h>
  44. BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_ARM, BOOST_HW_SIMD_ARM_NAME)