From bbfc4d54cd863676b3ae874e25dbe150fb6d575c Mon Sep 17 00:00:00 2001 From: Rasmus Munk Larsen Date: Fri, 2 Jul 2021 02:51:48 +0000 Subject: [PATCH] Use `padd` instead of `+`. --- Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h b/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h index f1e10c898..596d8a52f 100644 --- a/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +++ b/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h @@ -770,7 +770,7 @@ EIGEN_UNUSED Packet pdiv_complex(const Packet& x, const Packet& y) { const RealPacket y_scaled = pdiv(y.v, y_max); // c / max(|c|, |d|), d / max(|c|, |d|) // Compute scaled denominator. const RealPacket y_scaled_sq = pmul(y_scaled, y_scaled); // c'**2, d'**2 - const RealPacket denom = y_scaled_sq + pcplxflip(Packet(y_scaled_sq)).v; + const RealPacket denom = padd(y_scaled_sq, pcplxflip(Packet(y_scaled_sq)).v); Packet result_scaled = pmul(x, pconj(Packet(y_scaled))); // a * c' + b * d', -a * d + b * c // Divide elementwise by denom. result_scaled = Packet(pdiv(result_scaled.v, denom));