1/*
2Copyright Charly Chevalier 2015
3Copyright Joel Falcou 2015
4Distributed under the Boost Software License, Version 1.0.
5(See accompanying file LICENSE_1_0.txt or copy at
6http://www.boost.org/LICENSE_1_0.txt)
7*/
8
9#ifndef BOOST_PREDEF_HARDWARE_SIMD_PPC_H
10#define BOOST_PREDEF_HARDWARE_SIMD_PPC_H
11
12#include <boost/predef/version_number.h>
13#include <boost/predef/hardware/simd/ppc/versions.h>
14
15/* tag::reference[]
16= `BOOST_HW_SIMD_PPC`
17
18The SIMD extension for PowerPC (*if detected*).
19Version number depends on the most recent detected extension.
20
21[options="header"]
22|===
23| {predef_symbol} | {predef_version}
24
25| `+__VECTOR4DOUBLE__+` | {predef_detection}
26
27| `+__ALTIVEC__+` | {predef_detection}
28| `+__VEC__+` | {predef_detection}
29
30| `+__VSX__+` | {predef_detection}
31|===
32
33[options="header"]
34|===
35| {predef_symbol} | {predef_version}
36
37| `+__VECTOR4DOUBLE__+` | BOOST_HW_SIMD_PPC_QPX_VERSION
38
39| `+__ALTIVEC__+` | BOOST_HW_SIMD_PPC_VMX_VERSION
40| `+__VEC__+` | BOOST_HW_SIMD_PPC_VMX_VERSION
41
42| `+__VSX__+` | BOOST_HW_SIMD_PPC_VSX_VERSION
43|===
44
45*/ // end::reference[]
46
47#define BOOST_HW_SIMD_PPC BOOST_VERSION_NUMBER_NOT_AVAILABLE
48
49#undef BOOST_HW_SIMD_PPC
50#if !defined(BOOST_HW_SIMD_PPC) && defined(__VECTOR4DOUBLE__)
51# define BOOST_HW_SIMD_PPC BOOST_HW_SIMD_PPC_QPX_VERSION
52#endif
53#if !defined(BOOST_HW_SIMD_PPC) && defined(__VSX__)
54# define BOOST_HW_SIMD_PPC BOOST_HW_SIMD_PPC_VSX_VERSION
55#endif
56#if !defined(BOOST_HW_SIMD_PPC) && (defined(__ALTIVEC__) || defined(__VEC__))
57# define BOOST_HW_SIMD_PPC BOOST_HW_SIMD_PPC_VMX_VERSION
58#endif
59
60#if !defined(BOOST_HW_SIMD_PPC)
61# define BOOST_HW_SIMD_PPC BOOST_VERSION_NUMBER_NOT_AVAILABLE
62#else
63# define BOOST_HW_SIMD_PPC_AVAILABLE
64#endif
65
66#define BOOST_HW_SIMD_PPC_NAME "PPC SIMD"
67
68#endif
69
70#include <boost/predef/detail/test.h>
71BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_PPC, BOOST_HW_SIMD_PPC_NAME)
72

source code of include/boost/predef/hardware/simd/ppc.h