From d4b664c4cdcbfd5d4fe4cfbb59c1d6e735b3e469 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 19 Aug 2010 14:47:58 +0200 Subject: [PATCH] fix ugly conversion from double[2] to complex --- Eigen/src/Core/arch/SSE/Complex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Eigen/src/Core/arch/SSE/Complex.h b/Eigen/src/Core/arch/SSE/Complex.h index 585630563..819d59364 100644 --- a/Eigen/src/Core/arch/SSE/Complex.h +++ b/Eigen/src/Core/arch/SSE/Complex.h @@ -308,7 +308,7 @@ template<> EIGEN_STRONG_INLINE std::complex ei_pfirst(const { EIGEN_ALIGN16 double res[2]; _mm_store_pd(res, a.v); - return *(std::complex*)res; + return std::complex(res[0],res[1]); } template<> EIGEN_STRONG_INLINE Packet1cd ei_preverse(const Packet1cd& a) { return a; }