From 7ad1aaec1db2dbf1abfc19a5bb62626653fa48fb Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 10 Dec 2015 16:06:33 +0100 Subject: [PATCH] bug #1103: fix neon vectorization of pmul(Packet1cd,Packet1cd) --- Eigen/src/Core/arch/NEON/Complex.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Eigen/src/Core/arch/NEON/Complex.h b/Eigen/src/Core/arch/NEON/Complex.h index d2322b307..d2d467936 100644 --- a/Eigen/src/Core/arch/NEON/Complex.h +++ b/Eigen/src/Core/arch/NEON/Complex.h @@ -73,7 +73,7 @@ template<> EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf& a, con // Get the real values of a | a1_re | a1_re | a2_re | a2_re | v1 = vcombine_f32(vdup_lane_f32(vget_low_f32(a.v), 0), vdup_lane_f32(vget_high_f32(a.v), 0)); - // Get the real values of a | a1_im | a1_im | a2_im | a2_im | + // Get the imag values of a | a1_im | a1_im | a2_im | a2_im | v2 = vcombine_f32(vdup_lane_f32(vget_low_f32(a.v), 1), vdup_lane_f32(vget_high_f32(a.v), 1)); // Multiply the real a with b v1 = vmulq_f32(v1, b.v); @@ -325,8 +325,8 @@ template<> EIGEN_STRONG_INLINE Packet1cd pmul(const Packet1cd& a, con // Get the real values of a v1 = vdupq_lane_f64(vget_low_f64(a.v), 0); - // Get the real values of a - v2 = vdupq_lane_f64(vget_high_f64(a.v), 1); + // Get the imag values of a + v2 = vdupq_lane_f64(vget_high_f64(a.v), 0); // Multiply the real a with b v1 = vmulq_f64(v1, b.v); // Multiply the imag a with b