mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-30 17:10:38 +08:00
Remove OpenMP and No threading backends.
Since c++11, we can depend on C++ threads always being available. With the recent work on the performance of CXX threading, the additional complexity of maintaining multiple backends for some minor performance delta is not worth it https://github.com/ceres-solver/ceres-solver/issues/886 Change-Id: Idee480b22a498daec9c4366da8589aa58eaf36a1
This commit is contained in:
@@ -672,17 +672,7 @@ bool ProblemImpl::Evaluate(const Problem::EvaluateOptions& evaluate_options,
|
||||
// the Evaluator decides the storage for the Jacobian based on the
|
||||
// type of linear solver being used.
|
||||
evaluator_options.linear_solver_type = SPARSE_NORMAL_CHOLESKY;
|
||||
#ifdef CERES_NO_THREADS
|
||||
if (evaluate_options.num_threads > 1) {
|
||||
LOG(WARNING)
|
||||
<< "No threading support is compiled into this binary; "
|
||||
<< "only evaluate_options.num_threads = 1 is supported. Switching "
|
||||
<< "to single threaded mode.";
|
||||
}
|
||||
evaluator_options.num_threads = 1;
|
||||
#else
|
||||
evaluator_options.num_threads = evaluate_options.num_threads;
|
||||
#endif // CERES_NO_THREADS
|
||||
|
||||
// The main thread also does work so we only need to launch num_threads - 1.
|
||||
context_impl_->EnsureMinimumThreads(evaluator_options.num_threads - 1);
|
||||
|
||||
Reference in New Issue
Block a user