From c5c8efa575038fc2e428c17c60050f7abfbb7a1b Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 7 Feb 2011 16:41:21 +0100 Subject: [PATCH] workaround gcc 4.2 and 4.3 compilation issue with NEON --- Eigen/src/Core/arch/NEON/PacketMath.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Eigen/src/Core/arch/NEON/PacketMath.h b/Eigen/src/Core/arch/NEON/PacketMath.h index d826e969b..536fea3e0 100644 --- a/Eigen/src/Core/arch/NEON/PacketMath.h +++ b/Eigen/src/Core/arch/NEON/PacketMath.h @@ -84,6 +84,14 @@ template<> struct packet_traits : default_packet_traits }; }; +#if (defined __GNUC__) && (!(EIGEN_GNUC_AT_LEAST(4,4))) +// workaround gcc 4.2 and 4.3 compilatin issue +EIGEN_STRONG_INLINE float32x4_t vld1q_f32(const float* x) { return ::vld1q_f32((const float32_t*)x); } +EIGEN_STRONG_INLINE float32x2_t vld1_f32 (const float* x) { return ::vld1_f32 ((const float32_t*)x); } +EIGEN_STRONG_INLINE void vst1q_f32(float* to, float32x4_t from) { ::vst1q_f32((float32_t*)to,from); } +EIGEN_STRONG_INLINE void vst1_f32 (float* to, float32x2_t from) { ::vst1_f32 ((float32_t*)to,from); } +#endif + template<> struct unpacket_traits { typedef float type; enum {size=4}; }; template<> struct unpacket_traits { typedef int type; enum {size=4}; };