[eigen] Revision 925153 (and a tiny bug, I think) |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
Hi
Yesterday, I ran into a very nasty bug in Eigen 2.0 that has been fixed in
r925153. In short, this bug made MatrixBase<...>::col() reference wrong
(consecutive) elements with row major matrices. As I don't think I am the only
one using row major matrices with eigen, my question would be if this wouldn't
warrant a minor bugfix release (2.0.1?) with just the patch r925152 -> r925153
applied? In my opinion, this is a serious issue with this otherwise fantastic
library.
While browsing the code in order to find out what happened, I think I have
also discovered a (non-severe) bug in one of the assertions that is still
present in HEAD. The assertion tests RowsAtCompileTime != Dynamic twice, while
I firmly believe that one test should be ColsAtCompileTime != Dynamic.
Patch is attached.
Markus
--
PGP key on www.esat.kuleuven.be/~mmoll/public_key.pgp
Fingerprint is
90C4 B47D 1A00 5AC1 9147 3197 EDA7 1E0E 99E4 9EDB
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
diff -aur eigen2/Eigen/src/Core/Block.h eigen2-mm/Eigen/src/Core/Block.h
--- eigen2/Eigen/src/Core/Block.h 2009-03-31 13:13:20.685873468 +0200
+++ eigen2-mm/Eigen/src/Core/Block.h 2009-03-31 17:23:49.624498088 +0200
@@ -122,7 +122,7 @@
: m_matrix(matrix), m_startRow(startRow), m_startCol(startCol),
m_blockRows(matrix.rows()), m_blockCols(matrix.cols())
{
- EIGEN_STATIC_ASSERT(RowsAtCompileTime!=Dynamic && RowsAtCompileTime!=Dynamic,THIS_METHOD_IS_ONLY_FOR_FIXED_SIZE)
+ EIGEN_STATIC_ASSERT(RowsAtCompileTime!=Dynamic && ColsAtCompileTime!=Dynamic,THIS_METHOD_IS_ONLY_FOR_FIXED_SIZE)
ei_assert(startRow >= 0 && BlockRows >= 1 && startRow + BlockRows <= matrix.rows()
&& startCol >= 0 && BlockCols >= 1 && startCol + BlockCols <= matrix.cols());
}