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_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/* tag::reference[]
16= `BOOST_HW_SIMD_ARM`
17
18The SIMD extension for ARM (*if detected*).
19Version number depends on the most recent detected extension.
20
21[options="header"]
22|===
23| {predef_symbol} | {predef_version}
24
25| `+__ARM_NEON__+` | {predef_detection}
26| `+__aarch64__+` | {predef_detection}
27| `+_M_ARM+` | {predef_detection}
28| `+_M_ARM64+` | {predef_detection}
29|===
30
31[options="header"]
32|===
33| {predef_symbol} | {predef_version}
34
35| `+__ARM_NEON__+` | BOOST_HW_SIMD_ARM_NEON_VERSION
36| `+__aarch64__+` | BOOST_HW_SIMD_ARM_NEON_VERSION
37| `+_M_ARM+` | BOOST_HW_SIMD_ARM_NEON_VERSION
38| `+_M_ARM64+` | BOOST_HW_SIMD_ARM_NEON_VERSION
39|===
40
41*/ // end::reference[]
42
43#define BOOST_HW_SIMD_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE
44
45#undef BOOST_HW_SIMD_ARM
46#if !defined(BOOST_HW_SIMD_ARM) && (defined(__ARM_NEON__) || defined(__aarch64__) || defined (_M_ARM) || defined (_M_ARM64))
47# define BOOST_HW_SIMD_ARM BOOST_HW_SIMD_ARM_NEON_VERSION
48#endif
49
50#if !defined(BOOST_HW_SIMD_ARM)
51# define BOOST_HW_SIMD_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE
52#else
53# define BOOST_HW_SIMD_ARM_AVAILABLE
54#endif
55
56#define BOOST_HW_SIMD_ARM_NAME "ARM SIMD"
57
58#endif
59
60#include <boost/predef/detail/test.h>
61BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_ARM, BOOST_HW_SIMD_ARM_NAME)
62

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