From 527557672ab11a99ceecc2a3bfd9fea9dbe216dd Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Sun, 9 Aug 2009 20:49:55 +0200 Subject: [PATCH] disable the assembly for fast unaligned stores. indeed, there is a strange bug that is triggered by this code: #include int main() { Eigen::Matrix4f m; m <<1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; m.col(0).swap(m.col(1)); std::cout << m << std::endl; } when the fast unaligned stores are used, the column is copied instead of being swapped. --- Eigen/src/Core/arch/SSE/PacketMath.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Eigen/src/Core/arch/SSE/PacketMath.h b/Eigen/src/Core/arch/SSE/PacketMath.h index 3fd33afbf..130aa63ce 100644 --- a/Eigen/src/Core/arch/SSE/PacketMath.h +++ b/Eigen/src/Core/arch/SSE/PacketMath.h @@ -178,7 +178,7 @@ template<> EIGEN_STRONG_INLINE Packet4f ei_pload(const float* from) { template<> EIGEN_STRONG_INLINE Packet2d ei_pload(const double* from) { return _mm_load_pd(from); } template<> EIGEN_STRONG_INLINE Packet4i ei_pload(const int* from) { return _mm_load_si128(reinterpret_cast(from)); } -#if (!defined __GNUC__) && (!defined __ICC) +#if 1 // (!defined __GNUC__) && (!defined __ICC) template<> EIGEN_STRONG_INLINE Packet4f ei_ploadu(const float* from) { return _mm_loadu_ps(from); } template<> EIGEN_STRONG_INLINE Packet2d ei_ploadu(const double* from) { return _mm_loadu_pd(from); } template<> EIGEN_STRONG_INLINE Packet4i ei_ploadu(const int* from) { return _mm_loadu_si128(reinterpret_cast(from)); }