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

[ Thread Index | Date Index | More Archives ]

On Fri, Sep 3, 2010 at 1:50 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>  1. Gael makes me understand something I was missing above.

Let me try to be more specific. Consider the following high level construct:


(we could add others if needed).

This returns a Select<ConditionType,ThenType,ElseType> here
ThenType==C, ElseType==D, and ConditionType is a binary expression.

At compile time, Select checks that ConditionType::Scalar==bool and
Then, still at compile time, it asks ConditionType if it can returns
pseudo boolean packets compatible with ThenType::Scalar. For instance
A and B could be matrices of float while C and D contains doubles.
These packets are obtained through packet<Alignment,PacketType>(i,j).
Recall that in another thread we found that the packet functions had
to be templated on the packet type to support engines supporting
various packet size for the same scalar type.
If everything is ok, then this Select expression is marked as
Vectorizable. Problem solved.

Then we could add special versions of this select mechanism to
optimize cases where C or D is equal to zero. We could add a special
Zero expression which as no specific sizes nor scalar type, but always
return zero with overloads for common operators. Then we could
specialize and fully optimize select(C,Zero) etc.

Can you show me specific use cases that would not be covered by that ?


Mail converted by MHonArc 2.6.19+