Re: [eigen] Blocks and dynamic stack matrices

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


Sorry Gael. It seems that I messed something up.

- Hauke

On Wed, Oct 5, 2011 at 1:34 PM, Gael Guennebaud
<gael.guennebaud@xxxxxxxxx> wrote:
> sorry but I cannot reproduce and I don't see what is wrong in this
> assert. Here is my test example:
>
> #include <Eigen/Core>
> using namespace Eigen;
> int main()
> {
>  Matrix<double, Dynamic, Dynamic, 0, 3, 3> mat(2,2);
>
>  mat.col(1);
>  mat.row(0);
>
>  return 0;
> }
>
> gael.
>
> On Wed, Oct 5, 2011 at 10:09 AM, Hauke Heibel
> <hauke.heibel@xxxxxxxxxxxxxx> wrote:
>> 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/