mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Remove Solver::Options::num_linear_solver_threads
Also removed Solver::Summary::num_linear_solver_threads_given and Solver::Summary::num_linear_solver_threads_used. Change-Id: I559145ae2e7af597ea06ec03d386645a3a892e9f
This commit is contained in:
@@ -1280,16 +1280,6 @@ elimination group [LiSaad]_.
|
||||
The upside is that you do not need to build and link to an external
|
||||
library to use ``EIGEN_SPARSE``.
|
||||
|
||||
.. member:: int Solver::Options::num_linear_solver_threads
|
||||
|
||||
Default: ``-1``
|
||||
|
||||
**This field is deprecated, and is ignored by
|
||||
Ceres. Solver::Options::num_threads controls threading for all
|
||||
of Ceres Solver. This setting is scheduled to be removed in
|
||||
1.15.0.**
|
||||
|
||||
Number of threads used by the linear solver.
|
||||
|
||||
.. member:: shared_ptr<ParameterBlockOrdering> Solver::Options::linear_solver_ordering
|
||||
|
||||
@@ -2223,28 +2213,6 @@ The three arrays will be:
|
||||
:member:`Solver::Summary::num_threads_given` if none of `OpenMP`,
|
||||
`TBB` or `CXX11_THREADS` is available.
|
||||
|
||||
.. member:: int Solver::Summary::num_linear_solver_threads_given
|
||||
|
||||
**This field is deprecated and is scheduled to be removed in
|
||||
1.15.0.** :member:`Solver::Summary::num_threads_given` should be used
|
||||
instead. In the interim the value of this field will be the same as
|
||||
:member:`Solver::Summary::num_threads_given`.
|
||||
|
||||
Number of threads requested by the user for solving the trust
|
||||
region problem.
|
||||
|
||||
.. member:: int Solver::Summary::num_linear_solver_threads_used
|
||||
|
||||
**This field is deprecated and is scheduled to be removed in
|
||||
1.15.0.** :member:`Solver::Summary::num_threads_used` should be used
|
||||
instead. In the interim the value of this field will be the same as
|
||||
:member:`Solver::Summary::num_threads_used`.
|
||||
|
||||
Number of threads actually used by the solver for solving the trust
|
||||
region problem. This number is not equal to
|
||||
:member:`Solver::Summary::num_linear_solver_threads_given` if none
|
||||
of `OpenMP`, `TBB` or `CXX11_THREADS` is available.
|
||||
|
||||
.. member:: LinearSolverType Solver::Summary::linear_solver_type_given
|
||||
|
||||
Type of the linear solver requested by the user.
|
||||
|
||||
@@ -365,13 +365,6 @@ class CERES_EXPORT Solver {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// NOTE: This field is deprecated, and is ignored by
|
||||
// Ceres. Solver::Options::num_threads controls threading for all
|
||||
// of Ceres Solver.
|
||||
//
|
||||
// This setting is scheduled to be removed in 1.15.0.
|
||||
int num_linear_solver_threads = -1;
|
||||
|
||||
// The order in which variables are eliminated in a linear solver
|
||||
// can have a significant of impact on the efficiency and accuracy
|
||||
// of the method. e.g., when doing sparse Cholesky factorization,
|
||||
@@ -924,29 +917,6 @@ class CERES_EXPORT Solver {
|
||||
// num_threads_given if OpenMP is not available.
|
||||
int num_threads_used = -1;
|
||||
|
||||
// NOTE: This field is deprecated,
|
||||
// Solver::Summary::num_threads_given should be used instead.
|
||||
//
|
||||
// This field is scheduled to be removed in 1.15.0. In the interim
|
||||
// the value of this field will always be equal to
|
||||
// num_threads_given.
|
||||
//
|
||||
// Number of threads specified by the user for solving the trust
|
||||
// region problem.
|
||||
int num_linear_solver_threads_given = -1;
|
||||
|
||||
// NOTE: This field is deprecated,
|
||||
// Solver::Summary::num_threads_used should be used instead.
|
||||
//
|
||||
// This field is scheduled to be removed in 1.15.0. In the interim
|
||||
// the value of this field will always be equal to
|
||||
// num_threads_used.
|
||||
//
|
||||
// Number of threads actually used by the solver for solving the
|
||||
// trust region problem. This number is not equal to
|
||||
// num_threads_given if OpenMP is not available.
|
||||
int num_linear_solver_threads_used = -1;
|
||||
|
||||
// Type of the linear solver requested by the user.
|
||||
LinearSolverType linear_solver_type_given =
|
||||
#if defined(CERES_NO_SUITESPARSE) && defined(CERES_NO_CXSPARSE) && \
|
||||
|
||||
@@ -56,19 +56,6 @@ Preprocessor::~Preprocessor() {
|
||||
}
|
||||
|
||||
void ChangeNumThreadsIfNeeded(Solver::Options* options) {
|
||||
if (options->num_linear_solver_threads != -1 &&
|
||||
options->num_threads != options->num_linear_solver_threads) {
|
||||
LOG(WARNING) << "Solver::Options::num_threads = "
|
||||
<< options->num_threads
|
||||
<< " and Solver::Options::num_linear_solver_threads = "
|
||||
<< options->num_linear_solver_threads
|
||||
<< ". Solver::Options::num_linear_solver_threads is "
|
||||
<< "deprecated and is ignored."
|
||||
<< "Solver::Options::num_threads now controls threading "
|
||||
<< "behaviour in all of Ceres Solver. "
|
||||
<< "This field will go away in Ceres Solver 1.15.0.";
|
||||
}
|
||||
|
||||
#ifdef CERES_NO_THREADS
|
||||
if (options->num_threads > 1) {
|
||||
LOG(WARNING)
|
||||
|
||||
@@ -378,7 +378,6 @@ void PreSolveSummarize(const Solver::Options& options,
|
||||
summary->max_lbfgs_rank = options.max_lbfgs_rank;
|
||||
summary->minimizer_type = options.minimizer_type;
|
||||
summary->nonlinear_conjugate_gradient_type = options.nonlinear_conjugate_gradient_type; // NOLINT
|
||||
summary->num_linear_solver_threads_given = options.num_threads;
|
||||
summary->num_threads_given = options.num_threads;
|
||||
summary->preconditioner_type_given = options.preconditioner_type;
|
||||
summary->sparse_linear_algebra_library_type = options.sparse_linear_algebra_library_type; // NOLINT
|
||||
@@ -395,7 +394,6 @@ void PostSolveSummarize(const internal::PreprocessedProblem& pp,
|
||||
|
||||
summary->inner_iterations_used = pp.inner_iteration_minimizer.get() != NULL; // NOLINT
|
||||
summary->linear_solver_type_used = pp.linear_solver_options.type;
|
||||
summary->num_linear_solver_threads_used = pp.options.num_threads;
|
||||
summary->num_threads_used = pp.options.num_threads;
|
||||
summary->preconditioner_type_used = pp.options.preconditioner_type;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user