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

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


Hi Christoph,

thank you for the patch, and sorry for the delay.

Actually, I'm not sure what is the best to expose such features.  For
instance, bitwise operations for non integer types does not really
makes sense. They are only useful to perform very low level
vectorization optimizations. I would rather focus on improving the
vectorization of the higher level operations such that the user do not
have to explicitly deal with masks, etc. More precisely, I'm thinking
about the vectorization of the select mechanism:

result = (x > 0).select(a,b);

which means:

foreach i
  result_i = x_i > 0 ? a_i : b_i;

To alllow more aggressive optimization we should also add a way to
tell at compile time if a or b is either one or zero.

This should already cover 99% of the use case for bitwise operations
on non integral types. However this is not trivial since it affects
the return type of coeff-wise comparison operators which are currently
seen as an object of boolean. For vectorization purpose we should have
a way to request packets compatible with the scalar type of a and b.
Again, templating the *packet* function on the packet type seems to be
the way to go.

gael



On Sat, Aug 7, 2010 at 9:36 PM, keller <christoph-keller@xxxxxx> wrote:
> Hello,
>
> The Patch is attached.
>
> The contents of array.h of my previous post are not included, because i do
> not know how to do this in an Eigen-consistent way, that is useful for
> everyone.
>
> Thanks for all the time you invested in answering my questions.
>
> Greetings,
> Christoph
>
> P.S. This is my first patch for an OS Project
>



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