mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 03:39:01 +08:00
fix a strict aliasing issue with gcc 4.3
This commit is contained in:
parent
b5f2b7d087
commit
35f0bc70d8
@ -309,12 +309,9 @@ template<> EIGEN_STRONG_INLINE void ei_prefetch<std::complex<double> >(const std
|
||||
|
||||
template<> EIGEN_STRONG_INLINE std::complex<double> ei_pfirst<Packet1cd>(const Packet1cd& a)
|
||||
{
|
||||
// EIGEN_ALIGN16 double res[2];
|
||||
// _mm_store_pd(res, a.v);
|
||||
// return *(std::complex<double>*)res;
|
||||
EIGEN_ALIGN16 std::complex<double> res;
|
||||
ei_pstore(&res, a);
|
||||
return res;
|
||||
EIGEN_ALIGN16 double res[2];
|
||||
_mm_store_pd(res, a.v);
|
||||
return *(std::complex<double>*)res;
|
||||
}
|
||||
|
||||
template<> EIGEN_STRONG_INLINE Packet1cd ei_preverse(const Packet1cd& a) { return a; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user