ppc.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. /* tag::reference[]
  13. = `BOOST_HW_SIMD_PPC`
  14. The SIMD extension for PowerPC (*if detected*).
  15. Version number depends on the most recent detected extension.
  16. [options="header"]
  17. |===
  18. | {predef_symbol} | {predef_version}
  19. | `+__VECTOR4DOUBLE__+` | {predef_detection}
  20. | `+__ALTIVEC__+` | {predef_detection}
  21. | `+__VEC__+` | {predef_detection}
  22. | `+__VSX__+` | {predef_detection}
  23. |===
  24. [options="header"]
  25. |===
  26. | {predef_symbol} | {predef_version}
  27. | `+__VECTOR4DOUBLE__+` | BOOST_HW_SIMD_PPC_QPX_VERSION
  28. | `+__ALTIVEC__+` | BOOST_HW_SIMD_PPC_VMX_VERSION
  29. | `+__VEC__+` | BOOST_HW_SIMD_PPC_VMX_VERSION
  30. | `+__VSX__+` | BOOST_HW_SIMD_PPC_VSX_VERSION
  31. |===
  32. */ // end::reference[]
  33. #define BOOST_HW_SIMD_PPC BOOST_VERSION_NUMBER_NOT_AVAILABLE
  34. #undef BOOST_HW_SIMD_PPC
  35. #if !defined(BOOST_HW_SIMD_PPC) && defined(__VECTOR4DOUBLE__)
  36. # define BOOST_HW_SIMD_PPC BOOST_HW_SIMD_PPC_QPX_VERSION
  37. #endif
  38. #if !defined(BOOST_HW_SIMD_PPC) && defined(__VSX__)
  39. # define BOOST_HW_SIMD_PPC BOOST_HW_SIMD_PPC_VSX_VERSION
  40. #endif
  41. #if !defined(BOOST_HW_SIMD_PPC) && (defined(__ALTIVEC__) || defined(__VEC__))
  42. # define BOOST_HW_SIMD_PPC BOOST_HW_SIMD_PPC_VMX_VERSION
  43. #endif
  44. #if !defined(BOOST_HW_SIMD_PPC)
  45. # define BOOST_HW_SIMD_PPC BOOST_VERSION_NUMBER_NOT_AVAILABLE
  46. #else
  47. # define BOOST_HW_SIMD_PPC_AVAILABLE
  48. #endif
  49. #define BOOST_HW_SIMD_PPC_NAME "PPC SIMD"
  50. #endif
  51. #include <boost/predef/detail/test.h>
  52. BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_PPC, BOOST_HW_SIMD_PPC_NAME)