disable the assembly for fast unaligned stores. indeed, there is a strange bug that is triggered by this code:

#include<Eigen/Core>

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.
This commit is contained in:
Benoit Jacob 2009-08-09 20:49:55 +02:00
parent 8e08680119
commit 527557672a

View File

@ -178,7 +178,7 @@ template<> EIGEN_STRONG_INLINE Packet4f ei_pload<float>(const float* from) {
template<> EIGEN_STRONG_INLINE Packet2d ei_pload<double>(const double* from) { return _mm_load_pd(from); }
template<> EIGEN_STRONG_INLINE Packet4i ei_pload<int>(const int* from) { return _mm_load_si128(reinterpret_cast<const Packet4i*>(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<double>(const double* from) { return _mm_loadu_pd(from); }
template<> EIGEN_STRONG_INLINE Packet4i ei_ploadu<int>(const int* from) { return _mm_loadu_si128(reinterpret_cast<const Packet4i*>(from)); }