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*: Christoph Hertzberg <chtz@xxxxxxxxxxxxxxxxxxxxxxxx>*Date*: Fri, 21 Jan 2011 13:28:08 +0100

On 21.01.2011 13:02, Gael Guennebaud wrote: > note that our matrix-matrix product kernel for complexes does not use > this pmul function which is rather slow. The trick is to split the > products between the real and imaginary part and combine them at the > end of a series of mul-add. BTW: Have you tried the "3-multiplication-trick" for complex matrix multiplication yet: (A+iB)*(C+iD) = AC - BD + i[(A+B)*(C+D) - AC - BD] For big enough matrices this could give almost 25% performance gain -- at cost of little precision loss (could actually be quite large, e.g. if the imaginary part is much smaller than the real part). > Well this pmul function is actually used N^2 times for the > multiplication with alpha. Recall that our kernel computes C += alpha > * A * B, and even if you only do C = A*B this product with alpha is > still there, taking alpha = 1. Why? I admit this might be necessary in non-template libraries to reduce/avoid code duplication, but I would have assumed that this can be avoided by template specializations somehow (I have never checked your multiplication-kernel though ...) Christoph -- ---------------------------------------------- Dipl.-Inf. Christoph Hertzberg Cartesium 0.051 Universität Bremen Enrique-Schmidt-Straße 5 28359 Bremen Tel: (+49) 421-218-64252 ----------------------------------------------

**Follow-Ups**:**Re: [eigen] Vectorization of complex***From:*Gael Guennebaud

**References**:**[eigen] Eigen2 to Eigen3 Migration Path***From:*Tully Foote

**Re: [eigen] Eigen2 to Eigen3 Migration Path***From:*Hauke Heibel

**Re: [eigen] Eigen2 to Eigen3 Migration Path***From:*Benoit Jacob

**Re: [eigen] Eigen2 to Eigen3 Migration Path***From:*Hauke Heibel

**Re: [eigen] Eigen2 to Eigen3 Migration Path***From:*Gael Guennebaud

**Re: [eigen] Eigen2 to Eigen3 Migration Path***From:*Hauke Heibel

**Re: [eigen] Eigen2 to Eigen3 Migration Path***From:*Benoit Jacob

**Re: [eigen] Eigen2 to Eigen3 Migration Path***From:*Tully Foote

**Re: [eigen] Eigen2 to Eigen3 Migration Path***From:*Benoit Jacob

**Re: [eigen] Eigen2 to Eigen3 Migration Path***From:*Benoit Jacob

**Re: [eigen] Eigen2 to Eigen3 Migration Path***From:*Benoit Jacob

**Re: [eigen] Eigen2 to Eigen3 Migration Path***From:*Benoit Jacob

**RE: [eigen] Eigen2 to Eigen3 Migration Path***From:*Yohann Solaro

**[eigen] Vectorization of complex***From:*David Luitz

**Re: [eigen] Vectorization of complex***From:*Christoph Hertzberg

**Re: [eigen] Vectorization of complex***From:*Gael Guennebaud

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Vectorization of complex** - Next by Date:
**Re: [eigen] Eigen 3.0 Final Version** - Previous by thread:
**Re: [eigen] Vectorization of complex** - Next by thread:
**Re: [eigen] Vectorization of complex**

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