Re: [eigen] Array as the Scalar type

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



well if you think this can be supported without adding too much complexity, then let's go for it. Note that ideally we should also be able to do the same for any scalar types supporting expr. templates (e.g., autodiff types, multi-precision types, etc.).

It seems to me that this would require to adjust the functors to export a proper scalar type, and a new mechanism to get the "eval scalar type".

Btw, now I remember that a very very long time ago, I managed to get matrix<matrix<> > working with expr template, but it was on a alpha version of eigen 2, and I lost that piece of code (HD death) :(

gael

On Fri, May 7, 2010 at 10:18 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
Hi,

Mostly a question to Gael:

We wanted to enable support for Array as the scalar type, i.e.
Matrix<ArrayType, ...>.

But all our design is based on the assumption that it's OK to return
Scalars by value. E.g. the coeff() const methods in rvalue expressions
all return a Scalar by value.

So? Are we saying that using Array as Scalar type only is efficient
when the Array is small enough to fit entirely in registers? Should we
then discourage using large Array types as Scalar ? Note that would be
a bit disappointing as it would be the end of our "horizontal
vectorization" dreams.

Or do you want us to refactor Eigen so that we support _expression_
templates for the Scalar type?

In my rework of MathFunctions.h i have made sure to allow supporting
_expression_ templates for the Scalar type, and have implemented that
for Array expressions, but if it's the only part of Eigen that does
that, it makes no sense! Should I drop xpr template Scalar support,
which would simplify MathFunctions.h quite a bit (e.g. no need for
SFINAE anymore).

Benoit





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