Re: [eigen] vectorization of complex

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


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
>>
>>
>>
>>
>



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