diff options
Diffstat (limited to 'Eigen/src/Core/arch/MSA/Complex.h')
-rw-r--r-- | Eigen/src/Core/arch/MSA/Complex.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Eigen/src/Core/arch/MSA/Complex.h b/Eigen/src/Core/arch/MSA/Complex.h index 53dacfa43..76e9f7ca0 100644 --- a/Eigen/src/Core/arch/MSA/Complex.h +++ b/Eigen/src/Core/arch/MSA/Complex.h @@ -75,16 +75,13 @@ struct Packet2cf { EIGEN_STRONG_INLINE Packet2cf operator-(const Packet2cf& b) const { return Packet2cf(*this) -= b; } + EIGEN_STRONG_INLINE Packet2cf operator/(const Packet2cf& b) const { + return pdiv_complex(Packet2cf(*this), b); + } EIGEN_STRONG_INLINE Packet2cf& operator/=(const Packet2cf& b) { - *this *= b.conjugate(); - Packet4f s = pmul<Packet4f>(b.v, b.v); - s = padd(s, (Packet4f)__builtin_msa_shf_w((v4i32)s, EIGEN_MSA_SHF_I8(1, 0, 3, 2))); - v = pdiv(v, s); + *this = Packet2cf(*this) / b; return *this; } - EIGEN_STRONG_INLINE Packet2cf operator/(const Packet2cf& b) const { - return Packet2cf(*this) /= b; - } EIGEN_STRONG_INLINE Packet2cf operator-(void) const { return Packet2cf(pnegate(v)); } |