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/sparse_cholesky.h | |
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/sparse_cholesky.h')
-rw-r--r-- | extern/ceres/internal/ceres/sparse_cholesky.h | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/extern/ceres/internal/ceres/sparse_cholesky.h b/extern/ceres/internal/ceres/sparse_cholesky.h index a6af6b2c207..80c5cb2b83b 100644 --- a/extern/ceres/internal/ceres/sparse_cholesky.h +++ b/extern/ceres/internal/ceres/sparse_cholesky.h @@ -33,11 +33,13 @@ // This include must come before any #ifndef check on Ceres compile options. // clang-format off -#include "ceres/internal/port.h" +#include "ceres/internal/config.h" // clang-format on #include <memory> +#include "ceres/internal/disable_warnings.h" +#include "ceres/internal/export.h" #include "ceres/linear_solver.h" #include "glog/logging.h" @@ -67,7 +69,7 @@ namespace internal { // CHECK_EQ(sparse_cholesky->Solve(rhs.data(), solution.data(), &message), // LINEAR_SOLVER_SUCCESS); -class CERES_EXPORT_INTERNAL SparseCholesky { +class CERES_NO_EXPORT SparseCholesky { public: static std::unique_ptr<SparseCholesky> Create( const LinearSolver::Options& options); @@ -104,29 +106,28 @@ class CERES_EXPORT_INTERNAL SparseCholesky { // Convenience method which combines a call to Factorize and // Solve. Solve is only called if Factorize returns // LINEAR_SOLVER_SUCCESS. - virtual LinearSolverTerminationType FactorAndSolve( - CompressedRowSparseMatrix* lhs, - const double* rhs, - double* solution, - std::string* message); + LinearSolverTerminationType FactorAndSolve(CompressedRowSparseMatrix* lhs, + const double* rhs, + double* solution, + std::string* message); }; class IterativeRefiner; // Computes an initial solution using the given instance of // SparseCholesky, and then refines it using the IterativeRefiner. -class CERES_EXPORT_INTERNAL RefinedSparseCholesky : public SparseCholesky { +class CERES_NO_EXPORT RefinedSparseCholesky final : public SparseCholesky { public: RefinedSparseCholesky(std::unique_ptr<SparseCholesky> sparse_cholesky, std::unique_ptr<IterativeRefiner> iterative_refiner); - virtual ~RefinedSparseCholesky(); + ~RefinedSparseCholesky() override; - virtual CompressedRowSparseMatrix::StorageType StorageType() const; - virtual LinearSolverTerminationType Factorize(CompressedRowSparseMatrix* lhs, - std::string* message); - virtual LinearSolverTerminationType Solve(const double* rhs, - double* solution, - std::string* message); + CompressedRowSparseMatrix::StorageType StorageType() const override; + LinearSolverTerminationType Factorize(CompressedRowSparseMatrix* lhs, + std::string* message) override; + LinearSolverTerminationType Solve(const double* rhs, + double* solution, + std::string* message) override; private: std::unique_ptr<SparseCholesky> sparse_cholesky_; @@ -137,4 +138,6 @@ class CERES_EXPORT_INTERNAL RefinedSparseCholesky : public SparseCholesky { } // namespace internal } // namespace ceres +#include "ceres/internal/reenable_warnings.h" + #endif // CERES_INTERNAL_SPARSE_CHOLESKY_H_ |