Re: [eigen] aliasing system |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] aliasing system*From*: Andre Krause <post@xxxxxxxxxxxxxxxx>*Date*: Thu, 06 Sep 2007 14:33:45 +0200*Organization*: http://www.coreloop.com

Benoît Jacob wrote:

Hi,today I've added the aliasing system and remove operator<<, so the tutorial inmy previous e-mail does no longer work, I attach a new version of thetutorial.What is the aliasing system? It enables the creation of a temporary object.Expression templates remove temporaries, which is generally very good forperformance, but sometimes the temporary was really needed and its removalcauses problems.For instance, when you do (for a matrix m) m = m * m;

it gives m a wrong value, in Eigen2 like in every other ET-enabled library. Tocorrect that, do:m.alias() = m * m;Now our aliasing system is really powerful in that it is fully compatible withETs. So you can dom.alias().xpr().block(1,3,1,3) = m.block(0,2,0,2) to safely copy between overlapping blocks of a matrix. Cheers, Benoit

**Follow-Ups**:**Re: [eigen] aliasing system***From:*Benoit Jacob

**References**:**[eigen] aliasing system***From:*Benoît Jacob

**Messages sorted by:**[ date | thread ]- Prev by Date:
**[eigen] aliasing system** - Next by Date:
**Re: [eigen] aliasing system** - Previous by thread:
**[eigen] aliasing system** - Next by thread:
**Re: [eigen] aliasing system**

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