diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-06-18 11:12:01 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-06-19 13:02:21 +0300 |
commit | 31ae83381106a7aaee5303710b818c13f42ceddc (patch) | |
tree | 6935ebe7e84db7e54c689ea3308fb6df67e03d73 /intern/libmv | |
parent | 171c4fb238a2a65291540ac5406187bc69f3a6bc (diff) |
Ceres: Update to the latest upstream version
Using latest master because of various compilation error fixes.
Brings a lot of recent development. From most interesting parts:
- New threading model.
- Tiny solver.
- Compatibility with C++17.
Diffstat (limited to 'intern/libmv')
-rw-r--r-- | intern/libmv/libmv/simple_pipeline/bundle.cc | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/intern/libmv/libmv/simple_pipeline/bundle.cc b/intern/libmv/libmv/simple_pipeline/bundle.cc index 2ecc0505e1f..22ab0cdf864 100644 --- a/intern/libmv/libmv/simple_pipeline/bundle.cc +++ b/intern/libmv/libmv/simple_pipeline/bundle.cc @@ -21,6 +21,7 @@ #include "libmv/simple_pipeline/bundle.h" #include <map> +#include <thread> #include "ceres/ceres.h" #include "ceres/rotation.h" @@ -35,10 +36,6 @@ #include "libmv/simple_pipeline/tracks.h" #include "libmv/simple_pipeline/distortion_models.h" -#ifdef _OPENMP -# include <omp.h> -#endif - namespace libmv { // The intrinsics need to get combined into a single parameter block; use these @@ -642,11 +639,7 @@ void EuclideanBundlePointsOnly(const CameraIntrinsics *invariant_intrinsics, options.use_explicit_schur_complement = true; options.use_inner_iterations = true; options.max_num_iterations = 100; - -#ifdef _OPENMP - options.num_threads = omp_get_max_threads(); - options.num_linear_solver_threads = omp_get_max_threads(); -#endif + options.num_threads = std::thread::hardware_concurrency(); // Solve! ceres::Solver::Summary summary; @@ -807,11 +800,7 @@ void EuclideanBundleCommonIntrinsics( options.use_explicit_schur_complement = true; options.use_inner_iterations = true; options.max_num_iterations = 100; - -#ifdef _OPENMP - options.num_threads = omp_get_max_threads(); - options.num_linear_solver_threads = omp_get_max_threads(); -#endif + options.num_threads = std::thread::hardware_concurrency(); // Solve! ceres::Solver::Summary summary; |