[eigen] Blocks and dynamic stack matrices

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi guys,

I am getting a run-time assert when calling ::row on a Matrix<double,
Dynamic, Dynamic, 1, 3, 3>.

The assert is caused by the check in lines 291-293 of Block.h and the
issue is that BlockRows!=XprType::RowsAtCompileTime but
BlockRows==XprType::MaxRowsAtCompileTime. Changing the assert to

      eigen_assert( (i>=0) && (
          ((BlockRows==1) &&
(BlockCols==XprType::ColsAtCompileTime||BlockCols==XprType::MaxColsAtCompileTime)
&& i<xpr.rows())
        ||((BlockRows==XprType::RowsAtCompileTime||BlockRows==XprType::MaxRowsAtCompileTime)
&& (BlockCols==1) && i<xpr.cols())));

fixes the problem.

Does anybody see an issue with doing this globally in Block.h?

- Hauke



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/