Re: [eigen] aliasing system

[ Thread Index | Date Index | More Archives ]

Schleimer, Ben wrote:
   Won't matric.xpr().row(0) be a reference to a Matrix<double,2,2>::row?
So couldn't we still check if it's memory location is the same as any of the expressions on the
right side and if so, set an alias flag? Like:

void _ET_magic_generated_func(M& u, const M& v, const M& w)
    if(&u == &v || &u == &w)

even if it would be possible, an "IF" conditional branch is a very bad idea, except in debug mode. for release / optimized, final code it is the badest thing you can do to a prozessor: afaik conditional branches would stall the processor pipeline and cause huge speed impacts.

Mail converted by MHonArc 2.6.19+