mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 08:34:37 +08:00
Deprecate Solver::Options::num_linear_solver_threads
1. Solver::Options::num_threads now controls parallelism in Ceres Solver. The user specified value of Solver::Options::num_linear_solver_threads is ignored. 2. If the user specifies Solver::Options::num_linear_solver_threads and it is different from Solver::Options::num_threads, a warning is printed. 3. Solver::Summary:num_linear_solver_threads_given and Solver::Summary::num_linear_solver_threads_used are also deprecated and are always set to Solver::Summary::num_threads_given and Solver::Summary::num_threads_used. Change-Id: I20b9336d9336e400e6f0a15b63857c0c43eb271c
This commit is contained in:
+21
-5
@@ -118,7 +118,7 @@ class CERES_EXPORT Solver {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
num_linear_solver_threads = 1;
|
||||
num_linear_solver_threads = -1;
|
||||
use_explicit_schur_complement = false;
|
||||
use_postordering = false;
|
||||
dynamic_sparsity = false;
|
||||
@@ -425,9 +425,11 @@ class CERES_EXPORT Solver {
|
||||
// whether they are linked into Ceres at build time.
|
||||
SparseLinearAlgebraLibraryType sparse_linear_algebra_library_type;
|
||||
|
||||
// Number of threads used by Ceres to solve the Newton
|
||||
// step. Currently only the SPARSE_SCHUR solver is capable of
|
||||
// using this setting.
|
||||
// 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;
|
||||
|
||||
// The order in which variables are eliminated in a linear solver
|
||||
@@ -932,10 +934,24 @@ class CERES_EXPORT Solver {
|
||||
// num_threads_given if OpenMP is not available.
|
||||
int num_threads_used;
|
||||
|
||||
// Number of threads specified by the user for solving the trust
|
||||
// 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;
|
||||
|
||||
// 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.
|
||||
|
||||
Reference in New Issue
Block a user