Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/libmv/libmv')
-rw-r--r--intern/libmv/libmv/multiview/projection_test.cc8
-rw-r--r--intern/libmv/libmv/simple_pipeline/bundle.cc17
2 files changed, 7 insertions, 18 deletions
diff --git a/intern/libmv/libmv/multiview/projection_test.cc b/intern/libmv/libmv/multiview/projection_test.cc
index 460a186e7c4..40e766bfae7 100644
--- a/intern/libmv/libmv/multiview/projection_test.cc
+++ b/intern/libmv/libmv/multiview/projection_test.cc
@@ -68,10 +68,10 @@ TEST(Projection, isInFrontOfCamera) {
Vec4 X_front = GetRandomPoint();
Vec4 X_back = GetRandomPoint();
- X_front(2) = 10; // Any point in the positive Z direction
- // where Z > 1 is infront of the camera.
- X_back(2) = -10; // Any point int he negative Z dirstaion
- // is behind the camera.
+ X_front(2) = 10; /* Any point in the positive Z direction
+ * where Z > 1 is in front of the camera. */
+ X_back(2) = -10; /* Any point in the negative Z direction
+ * is behind the camera. */
bool res_front = isInFrontOfCamera(P, X_front);
bool res_back = isInFrontOfCamera(P, X_back);
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;