Re: [eigen] vectorization of complex |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] vectorization of complex
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Tue, 20 Jul 2010 16:20:47 +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=oD2sbAcxkRDPvXknSqzl16qlp9/z5p9TTGR3Mt0rU6w=; b=ZETWwB4CpjRyFZCttmYALTIZAmRtWD1pU4Yu6G8D2XyUC1nCyqbBidC0KpsSAuBwBS j37prJ5eBZH/SNAStG+HCX1ClhutyE4tzD/a1WAfzQuRdYrYHW16oISxuqhgxeuyhBrf xX0YQcfvVAcEuI7iaIXTCFUvNarFvjfsDyV8A=
- 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=Ku/GLALzSdTsdhahwEV8zcEJzH/Y64NiJR8Qf1fQr+/kZeKSmDspEsGrR4nQGhFofH k8Xp59xt56cI+/VotmKxvGRxNkNdNqwEqi7rE/El6469A0WJGfHxdbc8ldQoD8n7Y47e RGM9VmwYHXPDrDfYxcD6t9H5yf0Q9YgD2gIdc=
On Tue, Jul 20, 2010 at 4:01 PM, Gael Guennebaud
<gael.guennebaud@xxxxxxxxx> wrote:
> On Tue, Jul 20, 2010 at 2:38 PM, FMDSPAM <fmdspam@xxxxxxxxx> wrote:
>> Am 20.07.2010 11:47, schrieb Gael Guennebaud:
>>>
>>> [...] but 3 swizzling and one "bitwise or" operation to negate
>>> some coefficients. This make it far to be optimal. In particular
>>> swizzling is extremely costly. Moreover all these "complex" operations
>>> requires many additional registers to store the temporaries. [...]
>>
>> In another threat matlab was "blamed" to use separate matrices for real and
>> imaginary parts instead of one matrix of complex coeff.
>> How do you think, this would compete?
>
> Good point, with such an approach it is straightforward to support
> complex-complex and mixing types on top of a real-real matrix product
> with good performance I guess....
it's so simple that it took me a few second to write a bench for it
where "matlab" actually means "do the computation using Eigen and two
real matrix for complex matrix". This is for 2048^2 matrices:
real * real
eigen cpu 0.914452s 18.7871 GFLOPS
complex * real
eigen cpu 1.85377s 9.26751 GFLOPS
"matlab" cpu 1.83479s 9.36339 GFLOPS
real * complex
eigen cpu 1.86482s 9.2126 GFLOPS
"matlab" cpu 1.82954s 9.39029 GFLOPS
complex * complex
eigen cpu 3.65148s 4.70491 GFLOPS
eigen real 3.66268s 4.69052 GFLOPS
"matlab" cpu 3.66896s 4.68249 GFLOPS
"matlab" real 3.68158s 4.66644 GFLOPS
So indeed, since Matlab is based on a slightly faster BLAS than Eigen,
it might be slightly faster even for hybrid real-complex products...
gael
> gael
>
>>
>> --Frank
>>
>>
>>
>>
>