Re: [eigen] Assertion failure doing matA.col(??).noalias() = matB.row(??)

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


ok thank you for spotting it. fix and unit test  within a few minutes....


gael

On Thu, Sep 2, 2010 at 6:39 PM, Eamon Nerbonne <eamon.nerbonne@xxxxxxxxx> wrote:
> The following code fails with an assertion (on g++ & MSC)
>
>     MatrixXd matA, matB;
>
>     matA = MatrixXd::Random(12,15);
>     matB.resize(matA.cols(),matA.rows());
>     for(ptrdiff_t i=0;i<matA.rows();++i)
>         matB.col(i).noalias() = matA.row(i); //<-- fails here!
>     assert(matB.isApprox(matA.transpose());
>
>
> Without the .noalias, it succeeds.  Is this by design?  It's confusing, at
> least...
>
> --eamon@xxxxxxxxxxxx - Tel#:+31-6-15142163
>



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