aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/arch/AVX
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2016-11-22 21:41:30 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2016-11-22 21:41:30 +0100
commit7dd894e40e439a6d1f4aed659d1375d65589cff3 (patch)
tree3a7e216ba989832cd46047488314b30f963dbf33 /Eigen/src/Core/arch/AVX
parentf3fb0a1940c93c2eea2342b20506d652050ff48b (diff)
Optimize predux<Packet4d> (AVX)
Diffstat (limited to 'Eigen/src/Core/arch/AVX')
-rw-r--r--Eigen/src/Core/arch/AVX/PacketMath.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/Eigen/src/Core/arch/AVX/PacketMath.h b/Eigen/src/Core/arch/AVX/PacketMath.h
index e60ef307b..190e9a42b 100644
--- a/Eigen/src/Core/arch/AVX/PacketMath.h
+++ b/Eigen/src/Core/arch/AVX/PacketMath.h
@@ -401,8 +401,7 @@ template<> EIGEN_STRONG_INLINE float predux<Packet8f>(const Packet8f& a)
}
template<> EIGEN_STRONG_INLINE double predux<Packet4d>(const Packet4d& a)
{
- Packet4d tmp0 = _mm256_hadd_pd(a,_mm256_permute2f128_pd(a,a,1));
- return pfirst(_mm256_hadd_pd(tmp0,tmp0));
+ return predux(_mm_add_pd(_mm256_castpd256_pd128(a),_mm256_extractf128_pd(a,1)));
}
template<> EIGEN_STRONG_INLINE Packet4f predux_downto4<Packet8f>(const Packet8f& a)