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:
Sameer Agarwal
2022-11-26 16:02:28 -08:00
parent 352b320ab1
commit 06bfe6ffac
63 changed files with 34 additions and 563 deletions
-10
View File
@@ -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);