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:
authorAlexander Pinzon Fernandez <apinzonf@gmail.com>2013-12-11 20:10:22 +0400
committerAlexander Pinzon Fernandez <apinzonf@gmail.com>2013-12-11 20:10:22 +0400
commit2658a3c1b44717f497f187a38000c804eb37bbba (patch)
treeee55c673feabced8b6ec8bf9a8aa4d82a3cda3db /extern/libmv/third_party/ceres/internal/ceres/dense_qr_solver.cc
parent4005cb1c6a63a217df0e887c741beee2c1359301 (diff)
parent09b859d03f0ee138c4273ef8460e91d9888387a1 (diff)
Merge branch 'master' into soc-2013-sketch_meshsoc-2013-sketch_mesh
Conflicts: release/scripts/addons source/blender/blenloader/intern/readfile.c source/blender/blenloader/intern/writefile.c source/blender/editors/object/object_modifier.c source/blender/makesrna/intern/rna_modifier.c source/blender/modifiers/intern/MOD_laplaciandeform.c
Diffstat (limited to 'extern/libmv/third_party/ceres/internal/ceres/dense_qr_solver.cc')
-rw-r--r--extern/libmv/third_party/ceres/internal/ceres/dense_qr_solver.cc25
1 files changed, 12 insertions, 13 deletions
diff --git a/extern/libmv/third_party/ceres/internal/ceres/dense_qr_solver.cc b/extern/libmv/third_party/ceres/internal/ceres/dense_qr_solver.cc
index d76d58b51b5..4388357bd2d 100644
--- a/extern/libmv/third_party/ceres/internal/ceres/dense_qr_solver.cc
+++ b/extern/libmv/third_party/ceres/internal/ceres/dense_qr_solver.cc
@@ -60,6 +60,7 @@ LinearSolver::Summary DenseQRSolver::SolveImpl(
return SolveUsingLAPACK(A, b, per_solve_options, x);
}
}
+
LinearSolver::Summary DenseQRSolver::SolveUsingLAPACK(
DenseSparseMatrix* A,
const double* b,
@@ -100,21 +101,18 @@ LinearSolver::Summary DenseQRSolver::SolveUsingLAPACK(
work_.resize(work_size);
}
- const int info = LAPACK::SolveUsingQR(lhs_.rows(),
- lhs_.cols(),
- lhs_.data(),
- work_.rows(),
- work_.data(),
- rhs_.data());
- event_logger.AddEvent("Solve");
-
LinearSolver::Summary summary;
summary.num_iterations = 1;
- if (info == 0) {
+ summary.termination_type = LAPACK::SolveInPlaceUsingQR(lhs_.rows(),
+ lhs_.cols(),
+ lhs_.data(),
+ work_.rows(),
+ work_.data(),
+ rhs_.data(),
+ &summary.message);
+ event_logger.AddEvent("Solve");
+ if (summary.termination_type == LINEAR_SOLVER_SUCCESS) {
VectorRef(x, num_cols) = rhs_.head(num_cols);
- summary.termination_type = TOLERANCE;
- } else {
- summary.termination_type = FAILURE;
}
event_logger.AddEvent("TearDown");
@@ -161,7 +159,8 @@ LinearSolver::Summary DenseQRSolver::SolveUsingEigen(
// is good enough or not.
LinearSolver::Summary summary;
summary.num_iterations = 1;
- summary.termination_type = TOLERANCE;
+ summary.termination_type = LINEAR_SOLVER_SUCCESS;
+ summary.message = "Success.";
event_logger.AddEvent("TearDown");
return summary;