diff options
author | Benoit Jacob <benoitjacob@google.com> | 2016-03-30 11:02:33 -0400 |
---|---|---|
committer | Benoit Jacob <benoitjacob@google.com> | 2016-03-30 11:02:33 -0400 |
commit | 01b5333e44eea55f1dfc5edd7ec8ffec866d64ca (patch) | |
tree | 8ff03526d0f244ca38a8fce0820a2634432926cf /Eigen/src/Core/arch/NEON/PacketMath.h | |
parent | aa45ad2aac1f5a26e4258c58aa1712035351b536 (diff) |
bug #1186 - vreinterpretq_u64_f64 fails to build on Android/Aarch64/Clang toolchain
Diffstat (limited to 'Eigen/src/Core/arch/NEON/PacketMath.h')
-rw-r--r-- | Eigen/src/Core/arch/NEON/PacketMath.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Eigen/src/Core/arch/NEON/PacketMath.h b/Eigen/src/Core/arch/NEON/PacketMath.h index fc4c0d03a..fead02916 100644 --- a/Eigen/src/Core/arch/NEON/PacketMath.h +++ b/Eigen/src/Core/arch/NEON/PacketMath.h @@ -532,20 +532,21 @@ ptranspose(PacketBlock<Packet4i,4>& kernel) { #if EIGEN_ARCH_ARM64 && !EIGEN_APPLE_DOUBLE_NEON_BUG -#if (EIGEN_COMP_GNUC_STRICT && defined(__ANDROID__)) || defined(__apple_build_version__) // Bug 907: workaround missing declarations of the following two functions in the ADK -__extension__ static __inline uint64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_u64_f64 (float64x2_t __a) +// Defining these functions as templates ensures that if these intrinsics are +// already defined in arm_neon.h, then our workaround doesn't cause a conflict +// and has lower priority in overload resolution. +template <typename T> +uint64x2_t vreinterpretq_u64_f64(T a) { - return (uint64x2_t) __a; + return (uint64x2_t) a; } -__extension__ static __inline float64x2_t __attribute__ ((__always_inline__)) -vreinterpretq_f64_u64 (uint64x2_t __a) +template <typename T> +float64x2_t vreinterpretq_f64_u64(T a) { - return (float64x2_t) __a; + return (float64x2_t) a; } -#endif typedef float64x2_t Packet2d; typedef float64x1_t Packet1d; |