[eigen] Enabled muve support for Matrix and Array

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

Hi guys,

I have created a small patch which enables move support for Matrix and
Array - only if we enable C++0x.

I did not push it since I failed to do this correctly in the past but
I am confident that it is now working.

What is it all about!? Well, with move semantics enabled

MatrixXd m1( MatrixXd::Random(50,50).eval() );
MatrixXd m2( MatrixXd::Random(50,50) );

have identical performance. That means no additional copies are
triggered when assigning temporaries to lvalues (Matrix/Array).

I just recognized that I did not yet add operator=(Matrix/Array&&) but
that will be a trivial addition as soon as I get some confirmation
that the constructors work.

- Hauke

Attachment: move_support.patch
Description: Binary data

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