diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-07-31 16:24:29 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-07-31 16:24:29 +0200 |
commit | 26d2cdefd4dc291ba6613d5fd4127f6f1a6b5fa1 (patch) | |
tree | 8f42f8721705569ad76704eff0e9e13dfb4db8f5 /test/inverse.cpp | |
parent | db183ca7b31a366fa1a870927d68c3bf6de15c4d (diff) |
Fix 4x4 inverse via SSE for submatrices
Diffstat (limited to 'test/inverse.cpp')
-rw-r--r-- | test/inverse.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/inverse.cpp b/test/inverse.cpp index 8187b088d..1195bcc76 100644 --- a/test/inverse.cpp +++ b/test/inverse.cpp @@ -68,6 +68,14 @@ template<typename MatrixType> void inverse(const MatrixType& m) VERIFY_IS_MUCH_SMALLER_THAN(abs(det-m3.determinant()), RealScalar(1)); m3.computeInverseWithCheck(m4, invertible); VERIFY( rows==1 ? invertible : !invertible ); + + // check with submatrices + { + Matrix<Scalar, MatrixType::RowsAtCompileTime+1, MatrixType::RowsAtCompileTime+1, MatrixType::Options> m3; + m3.setRandom(); + m2 = m3.template topLeftCorner<MatrixType::RowsAtCompileTime,MatrixType::ColsAtCompileTime>().inverse(); + VERIFY_IS_APPROX( (m3.template topLeftCorner<MatrixType::RowsAtCompileTime,MatrixType::ColsAtCompileTime>()), m2.inverse() ); + } #endif // check in-place inversion |