|Re: [eigen] AVX/LRB and SSE with SoA support|
[ Thread 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, 20 Aug 2010 12:28:35 +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; bh=thFh/H+tc8ZXX1Bso01WgiVtZrjnK+OQApdvGo7wTfo=; b=u81AOCr0MFypuZkTXMF4cCguIXEMHrWMQ+WcCamOiZhhTvHbwGvREbqyA/sZ/LbMDC 9K0WEVcbnyhKRcVhLYzF0hlHJFVPnhfLPyKMpaIX2MSbQ4DzPCmAp00GAcX57v6wH86q Ct3YRS7hORSlQOyEI6Nk5chWxZXzmf5qHzrOk=
- 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; b=Ld0uc8BLDfG8UMbN13CjEf0GhjtEk+yUQtZbhK0zF1CFlbCsPhWr8Y8cSuvo9Xnz5b QqG4vCga5r/xIWiPAOIGdkI7jwD2BjUtbanVGP+zEswGby5Qi8DPzZxU0wXRH6omymZv FJ4SJtS29o0CdftLw7bItWcMlWtlIlcXC33Z8=
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);
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.
On Sat, Aug 7, 2010 at 9:36 PM, keller <christoph-keller@xxxxxx> wrote:
> 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
> Thanks for all the time you invested in answering my questions.
> P.S. This is my first patch for an OS Project