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:
Sameer Agarwal
2015-04-07 14:11:10 -07:00
parent e78a97accb
commit e712ce1810
13 changed files with 53 additions and 206 deletions
+8 -6
View File
@@ -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));
}
}