[eigen] efficient SoA with Eigen

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


Hi,

the new Array class is usable as Scalar type, which is great, but we
have to make sure that doing so is efficient.
 For example: Matrix<ArrayXf, 2, 2> m;  m = m + m;

For now I have taken care of the math functions, so doing m = m.log()
is efficient, as m.log() returns a Matrix of log array expressions.

But as far as I understand (correct me Gael if I'm wrong) we still
have to do work for the above m = m+m example.

In the result xpr for m+m, we need to make the Scalar type be the
result type of ArrayXf+ArrayXf.

I amn't sure where is the best place to do so:
 - in the CwiseBinaryOp xpr itself?
 - in the operator+ ?

Didn't think too much about it, just wanted to make sure that we don't
overlook that.

Benoit



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