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

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


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/