diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-02-09 13:04:35 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-02-09 13:04:35 +0100 |
commit | c0d51314359c54156b5daf3b24d88b5a60d97c74 (patch) | |
tree | 5c6e3813acb86a0f4262577933999c32006ccbf2 /Eigen | |
parent | 40526e24b44181e78da09d70bc300a74733a1bee (diff) |
workaround gcc 4.2.1 ICE (fix bug #145)
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/src/Core/arch/SSE/Complex.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Eigen/src/Core/arch/SSE/Complex.h b/Eigen/src/Core/arch/SSE/Complex.h index 902ebd9a9..2155ec614 100644 --- a/Eigen/src/Core/arch/SSE/Complex.h +++ b/Eigen/src/Core/arch/SSE/Complex.h @@ -111,9 +111,17 @@ template<> EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<flo template<> EIGEN_STRONG_INLINE std::complex<float> pfirst<Packet2cf>(const Packet2cf& a) { + #if (defined __GNUC__) && (__GNUC__==4) && (__GNUC_MINOR__==2) && (__GNUC_MINOR__==2) && (__GNUC_PATCHLEVEL__<=3) + // workaround gcc 4.2.1 ICE (mac's gcc version) - I'm not sure how the 4.2.2 and 4.2.3 deal with it, but 4.2.4 works well. + // this is not performance wise ideal, but who cares... + EIGEN_ALIGN16 std::complex<float> res[2]; + _mm_store_ps((float*)res, a.v); + return res[0]; + #else std::complex<float> res; _mm_storel_pi((__m64*)&res, a.v); return res; + #endif } template<> EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf& a) { return Packet2cf(_mm_castpd_ps(preverse(_mm_castps_pd(a.v)))); } |