diff options
author | Antonio Sanchez <cantonios@google.com> | 2021-02-25 14:29:49 -0800 |
---|---|---|
committer | Antonio Sánchez <cantonios@google.com> | 2021-02-27 22:42:07 +0000 |
commit | 1e0c7d4f4933b12a325dbaa2c79ce946bb13f7d6 (patch) | |
tree | 30d28ba3618296434df793ad25d06f68e6c98d65 /Eigen/src/Core/util/Macros.h | |
parent | 976ae0ca6f381a855daddcba73de72737be2e8a7 (diff) |
Add print for SSE/NEON, use NEON rounding intrinsics if available.
In SSE, by adding/subtracting 2^MantissaBits, we force rounding according to the
current rounding mode.
For NEON, we use the provided intrinsics for rint/floor/ceil if
available (armv8).
Related to #1969.
Diffstat (limited to 'Eigen/src/Core/util/Macros.h')
-rw-r--r-- | Eigen/src/Core/util/Macros.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index b39c6ca43..ac514cbb4 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -265,6 +265,14 @@ #define EIGEN_ARCH_ARM_OR_ARM64 0 #endif +/// \internal EIGEN_ARCH_ARMV8 set to 1 if the architecture is armv8 or greater. +#if EIGEN_ARCH_ARM_OR_ARM64 && defined(__ARM_ARCH) && __ARM_ARCH >= 8 +#define EIGEN_ARCH_ARMV8 1 +#else +#define EIGEN_ARCH_ARMV8 0 +#endif + + /// \internal EIGEN_HAS_ARM64_FP16 set to 1 if the architecture provides an IEEE /// compliant Arm fp16 type #if EIGEN_ARCH_ARM64 |