diff options
Diffstat (limited to 'intern/libmv/libmv/simple_pipeline/bundle.cc')
-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; |