diff options
-rw-r--r-- | Eigen/src/Jacobi/Jacobi.h | 8 | ||||
-rw-r--r-- | test/jacobi.cpp | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/Eigen/src/Jacobi/Jacobi.h b/Eigen/src/Jacobi/Jacobi.h index f62d0d8a4..01f4e6e8f 100644 --- a/Eigen/src/Jacobi/Jacobi.h +++ b/Eigen/src/Jacobi/Jacobi.h @@ -344,7 +344,7 @@ void /*EIGEN_DONT_INLINE*/ ei_apply_rotation_in_the_plane(VectorX& _x, VectorY& Packet xi = ei_pload<Packet>(px); Packet yi = ei_pload<Packet>(py); ei_pstore(px, ei_padd(ei_pmul(pc,xi),pcj.pmul(ps,yi))); - ei_pstore(py, ei_psub(ei_pmul(pc,yi),ei_pmul(ps,xi))); + ei_pstore(py, ei_psub(pcj.pmul(pc,yi),ei_pmul(ps,xi))); px += PacketSize; py += PacketSize; } @@ -360,8 +360,8 @@ void /*EIGEN_DONT_INLINE*/ ei_apply_rotation_in_the_plane(VectorX& _x, VectorY& Packet yi1 = ei_pload <Packet>(py+PacketSize); ei_pstoreu(px, ei_padd(ei_pmul(pc,xi),pcj.pmul(ps,yi))); ei_pstoreu(px+PacketSize, ei_padd(ei_pmul(pc,xi1),pcj.pmul(ps,yi1))); - ei_pstore (py, ei_psub(ei_pmul(pc,yi),ei_pmul(ps,xi))); - ei_pstore (py+PacketSize, ei_psub(ei_pmul(pc,yi1),ei_pmul(ps,xi1))); + ei_pstore (py, ei_psub(pcj.pmul(pc,yi),ei_pmul(ps,xi))); + ei_pstore (py+PacketSize, ei_psub(pcj.pmul(pc,yi1),ei_pmul(ps,xi1))); px += Peeling*PacketSize; py += Peeling*PacketSize; } @@ -370,7 +370,7 @@ void /*EIGEN_DONT_INLINE*/ ei_apply_rotation_in_the_plane(VectorX& _x, VectorY& Packet xi = ei_ploadu<Packet>(x+peelingEnd); Packet yi = ei_pload <Packet>(y+peelingEnd); ei_pstoreu(x+peelingEnd, ei_padd(ei_pmul(pc,xi),pcj.pmul(ps,yi))); - ei_pstore (y+peelingEnd, ei_psub(ei_pmul(pc,yi),ei_pmul(ps,xi))); + ei_pstore (y+peelingEnd, ei_psub(pcj.pmul(pc,yi),ei_pmul(ps,xi))); } } diff --git a/test/jacobi.cpp b/test/jacobi.cpp index eb839fa77..1c8d96e3c 100644 --- a/test/jacobi.cpp +++ b/test/jacobi.cpp @@ -87,6 +87,9 @@ void test_jacobi() CALL_SUBTEST_4(( jacobi<MatrixXf, float>(MatrixXf(r,c)) )); CALL_SUBTEST_5(( jacobi<MatrixXcd, double>(MatrixXcd(r,c)) )); CALL_SUBTEST_5(( jacobi<MatrixXcd, std::complex<double> >(MatrixXcd(r,c)) )); + // complex<float> is really important to test as it is the only way to cover conjugation issues in certain unaligned paths + CALL_SUBTEST_6(( jacobi<MatrixXcf, float>(MatrixXcf(r,c)) )); + CALL_SUBTEST_6(( jacobi<MatrixXcf, std::complex<float> >(MatrixXcf(r,c)) )); (void) r; (void) c; } |