Update code using deprecated Eigen::BDCSVD constructor in compliance with the newest Eigen.

Skip to first unread message


Jan 30, 2024, 9:49:52 PMJan 30
to Ceres Solver
Hi, I compiled the master branch of ceres-solver with the current master branch of eigen.
And I get this warning:
../3rd/ceres-solver/internal/ceres/covariance_impl.cc: In member function ‘bool ceres::internal::CovarianceImpl::ComputeCovarianceValuesUsingDenseSVD()’:
../3rd/ceres-solver/internal/ceres/covariance_impl.cc:727:70: warning: ‘Eigen::BDCSVD<MatrixType, Options>::BDCSVD(const MatrixType&, unsigned int) [with MatrixType_ = Eigen::Matrix<double, -1, -1, 1>; int Options_ = 0; MatrixType = Eigen::Matrix<double, -1, -1, 1>]’ is deprecated [-Wdeprecated-declarations]
  727 |                             Eigen::ComputeThinU | Eigen::ComputeThinV);
      |                                                                      ^
In file included from ../3rd/eigen/Eigen/SVD:40,
                 from ../3rd/ceres-solver/internal/ceres/covariance_impl.cc:42:
../3rd/eigen/Eigen/src/SVD/BDCSVD.h:202:20: note: declared here
  202 |   EIGEN_DEPRECATED BDCSVD(const MatrixType& matrix, unsigned int computationOptions) : m_algoswap(16), m_numIters(0) {

Then I check the deprecated list of eigen.
link: https://eigen.tuxfamily.org/dox/deprecated.html

Current usage of BDCSVD constructor is deprecated and will be removed in the next major eigen version.

Code under `internal/ceres/covariance_impl.cc line:726`
  Eigen::BDCSVD<Matrix> svd(dense_jacobian,
                            Eigen::ComputeThinU | Eigen::ComputeThinV);
should be changed to
  Eigen::BDCSVD<Matrix, Eigen::ComputeThinU | Eigen::ComputeThinV> svd(

I would like to open a pull request on GitHub for this. Do you have any suggestions?

Sameer Agarwal

Jan 30, 2024, 10:10:50 PMJan 30
to ceres-...@googlegroups.com
That would be great, please use the instructions at http://ceres-solver.org/contributing.html


You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/74aa14ed-a005-4438-9599-d4e1d2e9753cn%40googlegroups.com.
Reply all
Reply to author
0 new messages