aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/arch/AltiVec/Complex.h
diff options
context:
space:
mode:
authorGravatar Konstantinos Margaritis <markos@codex.gr>2010-07-10 00:09:29 +0300
committerGravatar Konstantinos Margaritis <markos@codex.gr>2010-07-10 00:09:29 +0300
commit6ad3f1ab1f950b417788ca0b7bb15bde948c158c (patch)
treed0d59052f92c80d9f069681d8814a6e50d02c9fb /Eigen/src/Core/arch/AltiVec/Complex.h
parent96f9015807365d253e1c5ab8a82595973ebfa72e (diff)
Added NEON/Complex.h, ~3.5x faster than scalar std::complex<float>
minor fix in AltiVec Complex.h
Diffstat (limited to 'Eigen/src/Core/arch/AltiVec/Complex.h')
-rw-r--r--Eigen/src/Core/arch/AltiVec/Complex.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/Eigen/src/Core/arch/AltiVec/Complex.h b/Eigen/src/Core/arch/AltiVec/Complex.h
index 62d1d45d1..2dba95a2f 100644
--- a/Eigen/src/Core/arch/AltiVec/Complex.h
+++ b/Eigen/src/Core/arch/AltiVec/Complex.h
@@ -132,10 +132,9 @@ template<> EIGEN_STRONG_INLINE Packet2cf ei_preverse(const Packet2cf& a)
template<> EIGEN_STRONG_INLINE std::complex<float> ei_predux<Packet2cf>(const Packet2cf& a)
{
Packet4f b;
- Packet2cf sum;
b = (Packet4f) vec_sld(a.v, a.v, 8);
- sum = ei_padd(a, Packet2cf(b));
- return ei_pfirst(sum);
+ b = ei_padd(a.v, b);
+ return ei_pfirst(Packet2cf(sum));
}
template<> EIGEN_STRONG_INLINE Packet2cf ei_preduxp<Packet2cf>(const Packet2cf* vecs)