mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-30 15:54:13 +08:00
compilation fixes
This commit is contained in:
parent
24950bdfcb
commit
fcae32cc3f
@ -216,10 +216,10 @@ struct ei_partial_lu_impl
|
|||||||
typedef Map<Matrix<Scalar, Dynamic, Dynamic, StorageOrder> > MapLU;
|
typedef Map<Matrix<Scalar, Dynamic, Dynamic, StorageOrder> > MapLU;
|
||||||
typedef Block<MapLU, Dynamic, Dynamic> MatrixType;
|
typedef Block<MapLU, Dynamic, Dynamic> MatrixType;
|
||||||
typedef Block<MatrixType,Dynamic,Dynamic> BlockType;
|
typedef Block<MatrixType,Dynamic,Dynamic> BlockType;
|
||||||
|
|
||||||
/** \internal performs the LU decomposition in-place of the matrix \a lu
|
/** \internal performs the LU decomposition in-place of the matrix \a lu
|
||||||
* using an unblocked algorithm.
|
* using an unblocked algorithm.
|
||||||
*
|
*
|
||||||
* In addition, this function returns the row transpositions in the
|
* In addition, this function returns the row transpositions in the
|
||||||
* vector \a row_transpositions which must have a size equal to the number
|
* vector \a row_transpositions which must have a size equal to the number
|
||||||
* of columns of the matrix \a lu, and an integer \a nb_transpositions
|
* of columns of the matrix \a lu, and an integer \a nb_transpositions
|
||||||
@ -233,7 +233,7 @@ struct ei_partial_lu_impl
|
|||||||
for(int k = 0; k < size; ++k)
|
for(int k = 0; k < size; ++k)
|
||||||
{
|
{
|
||||||
int row_of_biggest_in_col;
|
int row_of_biggest_in_col;
|
||||||
lu.block(k,k,rows-k,1).cwise().abs().maxCoeff(&row_of_biggest_in_col);
|
lu.col(k).end(rows-k).cwise().abs().maxCoeff(&row_of_biggest_in_col);
|
||||||
row_of_biggest_in_col += k;
|
row_of_biggest_in_col += k;
|
||||||
|
|
||||||
row_transpositions[k] = row_of_biggest_in_col;
|
row_transpositions[k] = row_of_biggest_in_col;
|
||||||
@ -296,7 +296,7 @@ struct ei_partial_lu_impl
|
|||||||
int bs = std::min(size-k,blockSize); // actual size of the block
|
int bs = std::min(size-k,blockSize); // actual size of the block
|
||||||
int trows = rows - k - bs; // trailing rows
|
int trows = rows - k - bs; // trailing rows
|
||||||
int tsize = size - k - bs; // trailing size
|
int tsize = size - k - bs; // trailing size
|
||||||
|
|
||||||
// partition the matrix:
|
// partition the matrix:
|
||||||
// A00 | A01 | A02
|
// A00 | A01 | A02
|
||||||
// lu = A10 | A11 | A12
|
// lu = A10 | A11 | A12
|
||||||
@ -344,7 +344,7 @@ void ei_partial_lu_inplace(MatrixType& lu, IntVector& row_transpositions, int& n
|
|||||||
{
|
{
|
||||||
ei_assert(lu.cols() == row_transpositions.size());
|
ei_assert(lu.cols() == row_transpositions.size());
|
||||||
ei_assert((&row_transpositions.coeffRef(1)-&row_transpositions.coeffRef(0)) == 1);
|
ei_assert((&row_transpositions.coeffRef(1)-&row_transpositions.coeffRef(0)) == 1);
|
||||||
|
|
||||||
ei_partial_lu_impl
|
ei_partial_lu_impl
|
||||||
<typename MatrixType::Scalar, MatrixType::Flags&RowMajorBit?RowMajor:ColMajor>
|
<typename MatrixType::Scalar, MatrixType::Flags&RowMajorBit?RowMajor:ColMajor>
|
||||||
::blocked_lu(lu.rows(), lu.cols(), &lu.coeffRef(0,0), lu.stride(), &row_transpositions.coeffRef(0), nb_transpositions);
|
::blocked_lu(lu.rows(), lu.cols(), &lu.coeffRef(0,0), lu.stride(), &row_transpositions.coeffRef(0), nb_transpositions);
|
||||||
|
@ -120,7 +120,7 @@ void test_redux()
|
|||||||
CALL_SUBTEST( matrixRedux(MatrixXi(8, 12)) );
|
CALL_SUBTEST( matrixRedux(MatrixXi(8, 12)) );
|
||||||
}
|
}
|
||||||
for(int i = 0; i < g_repeat; i++) {
|
for(int i = 0; i < g_repeat; i++) {
|
||||||
CALL_SUBTEST( vectorRedux(VectorX4f()) );
|
CALL_SUBTEST( vectorRedux(Vector4f()) );
|
||||||
CALL_SUBTEST( vectorRedux(VectorXd(10)) );
|
CALL_SUBTEST( vectorRedux(VectorXd(10)) );
|
||||||
CALL_SUBTEST( vectorRedux(VectorXf(33)) );
|
CALL_SUBTEST( vectorRedux(VectorXf(33)) );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user