mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Revert 81219ff.
Eigen upstream was broken a little while ago, and it seemed to be the case that we needed a fix for using the LLT factorization on ARM. This has been fixed and AFAIK there are no stable eigen releases with this bug in it. For full gore, see http://eigen.tuxfamily.org/bz/show_bug.cgi?id=992 In light of the fix, the extra layer of indirection introduced earlier is not needed and we are reverting to normal programming. Change-Id: I16929d2145253b38339b573b27b6b8fabd523704
This commit is contained in:
@@ -30,9 +30,9 @@
|
||||
|
||||
#include "ceres/implicit_schur_complement.h"
|
||||
|
||||
#include "Eigen/Dense"
|
||||
#include "ceres/block_sparse_matrix.h"
|
||||
#include "ceres/block_structure.h"
|
||||
#include "ceres/eigen_dense_cholesky.h"
|
||||
#include "ceres/internal/eigen.h"
|
||||
#include "ceres/internal/scoped_ptr.h"
|
||||
#include "ceres/linear_solver.h"
|
||||
@@ -148,16 +148,18 @@ void ImplicitSchurComplement::AddDiagonalAndInvert(
|
||||
const int row_block_pos = block_diagonal_structure->rows[r].block.position;
|
||||
const int row_block_size = block_diagonal_structure->rows[r].block.size;
|
||||
const Cell& cell = block_diagonal_structure->rows[r].cells[0];
|
||||
double* block_values = block_diagonal->mutable_values() + cell.position;
|
||||
MatrixRef m(block_values, row_block_size, row_block_size);
|
||||
MatrixRef m(block_diagonal->mutable_values() + cell.position,
|
||||
row_block_size, row_block_size);
|
||||
|
||||
if (D != NULL) {
|
||||
ConstVectorRef d(D + row_block_pos, row_block_size);
|
||||
m += d.array().square().matrix().asDiagonal();
|
||||
}
|
||||
|
||||
InvertUpperTriangularUsingCholesky(row_block_size,
|
||||
block_values,
|
||||
block_values);
|
||||
m = m
|
||||
.selfadjointView<Eigen::Upper>()
|
||||
.llt()
|
||||
.solve(Matrix::Identity(row_block_size, row_block_size));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user