diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-12-14 22:47:14 -0500 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-12-14 22:47:14 -0500 |
commit | d02eccf5840b356e741ea0e3166db2c7623b88c4 (patch) | |
tree | 5676a85636aaf78c82f2edd39edbbdddddf53cbf /test/prec_inverse_4x4.cpp | |
parent | d5f3b2dc943a712a92834cebaea8bb9caae2f6e9 (diff) |
add SSE path for Matrix4f inverse, taken from Intel except that we do a kosher
division instead of RCPPS-followed-by-Newton-Raphson. The rationale for that is
that elsewhere in Eigen we dont allow ourselves this approximation (which throws
2 bits of mantissa), so there's no reason we should allow it here.
Diffstat (limited to 'test/prec_inverse_4x4.cpp')
-rw-r--r-- | test/prec_inverse_4x4.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/test/prec_inverse_4x4.cpp b/test/prec_inverse_4x4.cpp index 83b1a8a71..8b7dbd8e7 100644 --- a/test/prec_inverse_4x4.cpp +++ b/test/prec_inverse_4x4.cpp @@ -37,12 +37,9 @@ template<typename MatrixType> void inverse_permutation_4x4() MatrixType m = PermutationMatrix<4>(indices); MatrixType inv = m.inverse(); double error = double( (m*inv-MatrixType::Identity()).norm() / epsilon<Scalar>() ); - error_max = std::max(error_max, error); + VERIFY(error == 0.0); std::next_permutation(indices.data(),indices.data()+4); } - std::cerr << "inverse_permutation_4x4, Scalar = " << type_name<Scalar>() << std::endl; - EIGEN_DEBUG_VAR(error_max); - VERIFY(error_max < 1. ); } template<typename MatrixType> void inverse_general_4x4(int repeat) @@ -68,7 +65,7 @@ template<typename MatrixType> void inverse_general_4x4(int repeat) EIGEN_DEBUG_VAR(error_avg); EIGEN_DEBUG_VAR(error_max); VERIFY(error_avg < (NumTraits<Scalar>::IsComplex ? 8.0 : 1.0)); - VERIFY(error_max < (NumTraits<Scalar>::IsComplex ? 64.0 : 16.0)); + VERIFY(error_max < (NumTraits<Scalar>::IsComplex ? 64.0 : 20.0)); } void test_prec_inverse_4x4() |