| 59 | Preprocessor::~Preprocessor() = default; |
| 60 | |
| 61 | void ChangeNumThreadsIfNeeded(Solver::Options* options) { |
| 62 | if (options->num_threads == 1) { |
| 63 | return; |
| 64 | } |
| 65 | const int num_threads_available = ThreadPool::MaxNumThreadsAvailable(); |
| 66 | if (options->num_threads > num_threads_available) { |
| 67 | LOG(WARNING) << "Specified options.num_threads: " << options->num_threads |
| 68 | << " exceeds maximum available from the threading model Ceres " |
| 69 | << "was compiled with: " << num_threads_available |
| 70 | << ". Bounding to maximum number available."; |
| 71 | options->num_threads = num_threads_available; |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | void SetupCommonMinimizerOptions(PreprocessedProblem* pp) { |
| 76 | const Solver::Options& options = pp->options; |
no outgoing calls
no test coverage detected