diff options
Diffstat (limited to 'Eigen/src/Core/arch/ZVector/Complex.h')
-rw-r--r-- | Eigen/src/Core/arch/ZVector/Complex.h | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/Eigen/src/Core/arch/ZVector/Complex.h b/Eigen/src/Core/arch/ZVector/Complex.h index 0b9b33d99..a81ec249b 100644 --- a/Eigen/src/Core/arch/ZVector/Complex.h +++ b/Eigen/src/Core/arch/ZVector/Complex.h @@ -169,10 +169,7 @@ EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet1cd,Packet2d) template<> EIGEN_STRONG_INLINE Packet1cd pdiv<Packet1cd>(const Packet1cd& a, const Packet1cd& b) { - // TODO optimize it for AltiVec - Packet1cd res = pmul(a,pconj(b)); - Packet2d s = vec_madd(b.v, b.v, p2d_ZERO_); - return Packet1cd(pdiv(res.v, s + vec_perm(s, s, p16uc_REVERSE64))); + return pdiv_complex(a, b); } EIGEN_STRONG_INLINE Packet1cd pcplxflip/*<Packet1cd>*/(const Packet1cd& x) @@ -308,11 +305,7 @@ EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet2cf,Packet4f) template<> EIGEN_STRONG_INLINE Packet2cf pdiv<Packet2cf>(const Packet2cf& a, const Packet2cf& b) { - // TODO optimize it for AltiVec - Packet2cf res; - res.cd[0] = pdiv<Packet1cd>(a.cd[0], b.cd[0]); - res.cd[1] = pdiv<Packet1cd>(a.cd[1], b.cd[1]); - return res; + return pdiv_complex(a, b); } EIGEN_STRONG_INLINE Packet2cf pcplxflip/*<Packet2cf>*/(const Packet2cf& x) @@ -394,10 +387,7 @@ EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet2cf,Packet4f) template<> EIGEN_STRONG_INLINE Packet2cf pdiv<Packet2cf>(const Packet2cf& a, const Packet2cf& b) { - // TODO optimize it for AltiVec - Packet2cf res = pmul(a, pconj(b)); - Packet4f s = pmul<Packet4f>(b.v, b.v); - return Packet2cf(pdiv(res.v, padd<Packet4f>(s, vec_perm(s, s, p16uc_COMPLEX32_REV)))); + return pdiv_complex(a, b); } template<> EIGEN_STRONG_INLINE Packet2cf pcplxflip<Packet2cf>(const Packet2cf& x) |