From 3b1ad31a1fe89fe0bd78e1fffdf22d47d43faaf5 Mon Sep 17 00:00:00 2001 From: Sameer Agarwal Date: Mon, 2 Dec 2013 15:43:20 -0800 Subject: [PATCH] Fix build breakage on old versions of SuiteSparse. Change-Id: I2a061615fc374abef2ed323c298359002a6fc5f1 --- internal/ceres/covariance_impl.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/ceres/covariance_impl.cc b/internal/ceres/covariance_impl.cc index faa0ce51d..75c80bf56 100644 --- a/internal/ceres/covariance_impl.cc +++ b/internal/ceres/covariance_impl.cc @@ -441,23 +441,23 @@ bool CovarianceImpl::ComputeCovarianceValuesUsingSparseCholesky() { cholmod_jacobian_view.sorted = 1; cholmod_jacobian_view.packed = 1; - string status; - cholmod_factor* factor = ss.AnalyzeCholesky(&cholmod_jacobian_view, &status); + string message; + cholmod_factor* factor = ss.AnalyzeCholesky(&cholmod_jacobian_view, &message); event_logger.AddEvent("Symbolic Factorization"); if (factor == NULL) { LOG(ERROR) << "Covariance estimation failed. " << "CHOLMOD symbolic cholesky factorization returned with: " - << status; + << message; return false; } LinearSolverTerminationType termination_type = - ss.Cholesky(&cholmod_jacobian_view, factor, &status); + ss.Cholesky(&cholmod_jacobian_view, factor, &message); event_logger.AddEvent("Numeric Factorization"); if (termination_type != LINEAR_SOLVER_SUCCESS) { LOG(ERROR) << "Covariance estimation failed. " << "CHOLMOD numeric cholesky factorization returned with: " - << status; + << message; ss.Free(factor); return false; } @@ -506,7 +506,7 @@ bool CovarianceImpl::ComputeCovarianceValuesUsingSparseCholesky() { } rhs_x[r] = 1.0; - cholmod_dense* solution = ss.Solve(factor, rhs); + cholmod_dense* solution = ss.Solve(factor, rhs, &message); double* solution_x = reinterpret_cast(solution->x); for (int idx = row_begin; idx < row_end; ++idx) { const int c = cols[idx];