diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-05-10 17:36:22 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-05-10 18:01:20 +0300 |
commit | 3ad2597a4eca5091031c213445c6583e21097d5f (patch) | |
tree | f909af8ad783d1adea67911ddaf1633ad7f570a9 /extern/ceres/internal/ceres/conjugate_gradients_solver.cc | |
parent | b4b85c5ce2752ea9241cbcfa1ddc3f639ad64262 (diff) |
Update Ceres to latest upstream version 2.1.0temp-ceres_update
This release deprecated the Parameterization API and the new Manifolds
API is to be used instead. This is what was done in the Libmv as part
of this change.
Additionally, remove the bundling scripts. Nowadays those are only
leading to a duplicated work to maintain.
Diffstat (limited to 'extern/ceres/internal/ceres/conjugate_gradients_solver.cc')
-rw-r--r-- | extern/ceres/internal/ceres/conjugate_gradients_solver.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/extern/ceres/internal/ceres/conjugate_gradients_solver.cc b/extern/ceres/internal/ceres/conjugate_gradients_solver.cc index 3019628a16c..62ae9201cb5 100644 --- a/extern/ceres/internal/ceres/conjugate_gradients_solver.cc +++ b/extern/ceres/internal/ceres/conjugate_gradients_solver.cc @@ -41,6 +41,7 @@ #include <cmath> #include <cstddef> +#include <utility> #include "ceres/internal/eigen.h" #include "ceres/linear_operator.h" @@ -57,8 +58,8 @@ bool IsZeroOrInfinity(double x) { return ((x == 0.0) || std::isinf(x)); } } // namespace ConjugateGradientsSolver::ConjugateGradientsSolver( - const LinearSolver::Options& options) - : options_(options) {} + LinearSolver::Options options) + : options_(std::move(options)) {} LinearSolver::Summary ConjugateGradientsSolver::Solve( LinearOperator* A, @@ -112,7 +113,7 @@ LinearSolver::Summary ConjugateGradientsSolver::Solve( for (summary.num_iterations = 1;; ++summary.num_iterations) { // Apply preconditioner - if (per_solve_options.preconditioner != NULL) { + if (per_solve_options.preconditioner != nullptr) { z.setZero(); per_solve_options.preconditioner->RightMultiply(r.data(), z.data()); } else { |