Re: [eigen] AVX/LRB and SSE with SoA support |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] AVX/LRB and SSE with SoA support
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Fri, 3 Sep 2010 15:56:49 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=38js49gUC0D9qv7HprbWW4QRElxRNWMDg+UFJLaVxBw=; b=oYj3CauBIyilqyze5AT0jarJO81RE0T9lKKXwhfcnd0HgIzEYeRe4ayS02STpvV850 hkDJ1T2jo9ms2uNRMDxtjS45d6x5LO36qr5IB7zgmp6GTJK++gNI8OPfiPahzdjB9MsO McM3jCQWt0mlCzJnbKt8/0GbhsPcJxYVjR3hI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=ZYVNWc/rrrXCw+NSTXloyQKW+XjBiwdm+qYXKwdafe0hJ+IoIzYSDQK0YbtKkrcNRt PowBKaPthr86P0BDxON50a9qrQ4Iq4qKtfBxOy/5rVDwhFbmPmh/khB3lOfxh8qqI3SQ poivvGNfq9rlYj5/7QoKIzUDlkq0d4OWO58Bo=
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:
(A<B).select(C,D)
(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
ThenType::Scalar==ElseType::Scalar.
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 ?
gael