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 | |
9 | #ifndef BOOST_PREDEF_HARDWARE_SIMD_ARM_H |
10 | #define BOOST_PREDEF_HARDWARE_SIMD_ARM_H |
11 | |
12 | #include <boost/predef/version_number.h> |
13 | #include <boost/predef/hardware/simd/arm/versions.h> |
14 | |
15 | /*` |
16 | [heading `BOOST_HW_SIMD_ARM`] |
17 | |
18 | The SIMD extension for ARM (*if detected*). |
19 | Version number depends on the most recent detected extension. |
20 | |
21 | [table |
22 | [[__predef_symbol__] [__predef_version__]] |
23 | |
24 | [[`__ARM_NEON__`] [__predef_detection__]] |
25 | [[`__aarch64__`] [__predef_detection__]] |
26 | [[`_M_ARM`] [__predef_detection__]] |
27 | [[`_M_ARM64`] [__predef_detection__]] |
28 | ] |
29 | |
30 | [table |
31 | [[__predef_symbol__] [__predef_version__]] |
32 | |
33 | [[`__ARM_NEON__`] [BOOST_HW_SIMD_ARM_NEON_VERSION]] |
34 | [[`__aarch64__`] [BOOST_HW_SIMD_ARM_NEON_VERSION]] |
35 | [[`_M_ARM`] [BOOST_HW_SIMD_ARM_NEON_VERSION]] |
36 | [[`_M_ARM64`] [BOOST_HW_SIMD_ARM_NEON_VERSION]] |
37 | ] |
38 | |
39 | */ |
40 | |
41 | #define BOOST_HW_SIMD_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE |
42 | |
43 | #undef BOOST_HW_SIMD_ARM |
44 | #if !defined(BOOST_HW_SIMD_ARM) && (defined(__ARM_NEON__) || defined(__aarch64__) || defined (_M_ARM) || defined (_M_ARM64)) |
45 | # define BOOST_HW_SIMD_ARM BOOST_HW_SIMD_ARM_NEON_VERSION |
46 | #endif |
47 | |
48 | #if !defined(BOOST_HW_SIMD_ARM) |
49 | # define BOOST_HW_SIMD_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE |
50 | #else |
51 | # define BOOST_HW_SIMD_ARM_AVAILABLE |
52 | #endif |
53 | |
54 | #define BOOST_HW_SIMD_ARM_NAME "ARM SIMD" |
55 | |
56 | #endif |
57 | |
58 | #include <boost/predef/detail/test.h> |
59 | BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_ARM, BOOST_HW_SIMD_ARM_NAME) |
60 | |