mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-30 00:50:37 +08:00
Less strict check for multithreading.
Removes the CHECK-fail for num_threads > 1 when OpenMP is not detected Change-Id: I5c1d48aad66c8b7a1f73c93dae572b73953859a0
This commit is contained in:
@@ -116,9 +116,13 @@ class ProgramEvaluator : public Evaluator {
|
||||
evaluate_preparers_(
|
||||
jacobian_writer_.CreateEvaluatePreparers(options.num_threads)) {
|
||||
#ifndef CERES_USE_OPENMP
|
||||
CHECK_EQ(1, options_.num_threads)
|
||||
<< "OpenMP support is not compiled into this binary; "
|
||||
<< "only options.num_threads=1 is supported.";
|
||||
if (options_.num_threads > 1) {
|
||||
LOG(WARNING)
|
||||
<< "OpenMP support is not compiled into this binary; "
|
||||
<< "only options.num_threads = 1 is supported. Switching "
|
||||
<< "to single threaded mode.";
|
||||
options_.num_threads = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
BuildResidualLayout(*program, &residual_layout_);
|
||||
|
||||
Reference in New Issue
Block a user