Re: [eigen] AVX/LRB and SSE with SoA support

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


On 08/23/2010 08:53 PM, Gael Guennebaud wrote:
well, Eigen is a general purpose math library and so such "hacks" does
not match well with our objectives. We have to find a better solution.
Hi,

If one wants to use the Vector units of the processor and store masks for comparisons, the comparison operators cannot return values of type bool.

The only typesafe solution i see here is to introduce types like IntBool, FloatBool, DoubleBool etc. (These could be template types like EigenBool<type X>...). The size of the template is like the size of X, so it can store the mask. One can add functions like toBool(), select and so on.
One could even add a Conversion-To-Bool expression template ;-)
I understand this seems to be a lot of work, but the reward is a significant increase in speed. In the future the increase will become even bigger, because of wider vector registers.

I did a part of the demo program using plugins, but this is not enough, as Eigen has already comparison operators, so one would have to derive in this case to avoid changing the original code.

You could at least take the few Intrinsics specialisations and expression templates from the patch.
Thanks for all your time.

Greetings,
Christoph



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