ppc.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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_PPC_H
  9. #define BOOST_PREDEF_HARDWARE_SIMD_PPC_H
  10. #include <boost/predef/version_number.h>
  11. #include <boost/predef/hardware/simd/ppc/versions.h>
  12. /*`
  13. [heading `BOOST_HW_SIMD_PPC`]
  14. The SIMD extension for PowerPC (*if detected*).
  15. Version number depends on the most recent detected extension.
  16. [table
  17. [[__predef_symbol__] [__predef_version__]]
  18. [[`__VECTOR4DOUBLE__`] [__predef_detection__]]
  19. [[`__ALTIVEC__`] [__predef_detection__]]
  20. [[`__VEC__`] [__predef_detection__]]
  21. [[`__VSX__`] [__predef_detection__]]
  22. ]
  23. [table
  24. [[__predef_symbol__] [__predef_version__]]
  25. [[`__VECTOR4DOUBLE__`] [BOOST_HW_SIMD_PPC_QPX_VERSION]]
  26. [[`__ALTIVEC__`] [BOOST_HW_SIMD_PPC_VMX_VERSION]]
  27. [[`__VEC__`] [BOOST_HW_SIMD_PPC_VMX_VERSION]]
  28. [[`__VSX__`] [BOOST_HW_SIMD_PPC_VSX_VERSION]]
  29. ]
  30. */
  31. #define BOOST_HW_SIMD_PPC BOOST_VERSION_NUMBER_NOT_AVAILABLE
  32. #undef BOOST_HW_SIMD_PPC
  33. #if !defined(BOOST_HW_SIMD_PPC) && defined(__VECTOR4DOUBLE__)
  34. # define BOOST_HW_SIMD_PPC BOOST_HW_SIMD_PPC_QPX_VERSION
  35. #endif
  36. #if !defined(BOOST_HW_SIMD_PPC) && defined(__VSX__)
  37. # define BOOST_HW_SIMD_PPC BOOST_HW_SIMD_PPC_VSX_VERSION
  38. #endif
  39. #if !defined(BOOST_HW_SIMD_PPC) && (defined(__ALTIVEC__) || defined(__VEC__))
  40. # define BOOST_HW_SIMD_PPC BOOST_HW_SIMD_PPC_VMX_VERSION
  41. #endif
  42. #if !defined(BOOST_HW_SIMD_PPC)
  43. # define BOOST_HW_SIMD_PPC BOOST_VERSION_NUMBER_NOT_AVAILABLE
  44. #else
  45. # define BOOST_HW_SIMD_PPC_AVAILABLE
  46. #endif
  47. #define BOOST_HW_SIMD_PPC_NAME "PPC SIMD"
  48. #endif
  49. #include <boost/predef/detail/test.h>
  50. BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_PPC, BOOST_HW_SIMD_PPC_NAME)