Re: [eigen] about .lazy()

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


Hi,

On Sat, Aug 15, 2009 at 10:48 PM, Benoit Jacob<jacob.benoit.1@xxxxxxxxx> wrote:
> (...) For example the
> Transpose expression. And even Block if you take blocks on both sides
> of an assignment (think row(i) = col(j)). So actually, a lot of
> expressions "may alias" (...)

I am wondering whether following the reasoning used for operator* for
matrices, all operators that might alias should be implemented in a
conservative way. I.e. with introducing temporaries as long as
noalias() is not used explicity? I don't see why we should not
implement the same level of safety we have for operator* for all
potentially aliasing operations. I would be probably desired to have
something like this

MatrixXd a(3,4);
a << 1,2,3,4,5,6,7,8,9,10,11,12;
a = a.block(0,0,3,2);

woking properly...

- Hauke



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