Re: [eigen] Matrix multiplication seems to be exceptionally slow in one specific case |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] Matrix multiplication seems to be exceptionally slow in one specific case*From*: Christoph Hertzberg <chtz@xxxxxxxxxxxxxxxxxxxxxxxx>*Date*: Tue, 17 Jun 2014 10:30:34 +0200

On 16.06.2014 18:54, Marc Glisse wrote:

On Mon, 16 Jun 2014, Christoph Hertzberg wrote:While I like the idea in general, I'm not totally sure about that either.If you have doubts about the proposal, they are just as welcome on the mailing list I mentioned ;-) Matrix expression-template libraries are the first expected customer for this feature...

auto AB = A*B; // shall this evaluate into a temporary?Write auto&& (or auto const&) if you don't want value semantics.

MatrixXd result = AB+C; // actually, no explicit temporary AB required // direct evaluation would have been betterUnless there is a second use of AB somewhere further in the code. I think there was an item in bugzilla or elsewhere about adding a profile mode that would among other things tell you if an expression was used enough times that it should have been evaluated eagerly?

MatrixBase<Derived>::normalized() const { typedef nested_eval<Derived,2>::type ThisNested; ThisNested n(this->derived()); return n / n.norm(); }

I posted a bug for that: http://eigen.tuxfamily.org/bz/show_bug.cgi?id=825I added a similar warning to the GMP manual some time ago: https://gmplib.org/manual/C_002b_002b-Interface-Limitations.html

Yes, that seems to be basically the same problem that we have. Christoph -- ---------------------------------------------- Dipl.-Inf., Dipl.-Math. Christoph Hertzberg Cartesium 0.049 Universität Bremen Enrique-Schmidt-Straße 5 28359 Bremen Tel: +49 (421) 218-64252 ----------------------------------------------

**Follow-Ups**:

**References**:**[eigen] Matrix multiplication seems to be exceptionally slow in one specific case***From:*Thijs.Kooi

**Re: [eigen] Matrix multiplication seems to be exceptionally slow in one specific case***From:*Christian Seiler

**Re: [eigen] Matrix multiplication seems to be exceptionally slow in one specific case***From:*Marc Glisse

**Re: [eigen] Matrix multiplication seems to be exceptionally slow in one specific case***From:*Christoph Hertzberg

**Re: [eigen] Matrix multiplication seems to be exceptionally slow in one specific case***From:*Marc Glisse

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] Matrix multiplication seems to be exceptionally slow in one specific case** - Next by Date:
**Re: [eigen] Matrix multiplication seems to be exceptionally slow in one specific case** - Previous by thread:
**Re: [eigen] Matrix multiplication seems to be exceptionally slow in one specific case** - Next by thread:
**Re: [eigen] Matrix multiplication seems to be exceptionally slow in one specific case**

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