Enable Eigen as sparse linear algebra library. SPARSE_NORMAL_CHOLESKY and SPARSE_SCHUR can now be used with EIGEN_SPARSE as the backend. The performance is not as good as CXSparse. This needs to be investigated. Is it because the quality of AMD ordering that we are computing is not as good as the one for CXSparse? This could be because we are working with the scalar matrix instead of the block matrix. Also, the upper/lower triangular story is not completely clear. Both of these issues will be benchmarked and tackled in the near future. Also included in this change is a bunch of cleanup to the SparseNormalCholeskySolver and SparseSchurComplementSolver classes around the use of the of defines used to conditionally compile out parts of the code. The system_test has been updated to test EIGEN_SPARSE also. Change-Id: I46a57e9c4c97782696879e0b15cfc7a93fe5496a
diff --git a/internal/ceres/cxsparse.h b/internal/ceres/cxsparse.h index 1fed82f..5868401 100644 --- a/internal/ceres/cxsparse.h +++ b/internal/ceres/cxsparse.h
@@ -38,7 +38,6 @@ #include <vector> #include "cs.h" -#include "ceres/internal/port.h" namespace ceres { namespace internal { @@ -130,9 +129,13 @@ #else // CERES_NO_CXSPARSE -class CXSparse {}; typedef void cs_dis; +class CXSparse { + public: + void Free(void*) {}; + +}; #endif // CERES_NO_CXSPARSE #endif // CERES_INTERNAL_CXSPARSE_H_