Subject: Re: [ublas] rvalue reference and move
From: Michael Chen (sth4nth_at_[hidden])
Date: 2010-05-22 13:40:48
The example showed in that link does not entirely eliminate
temporaries. Consider the expression
x = (a+b)+(c+d);
here we construct two temporaries and one is wasted.
However, I don't think we should re-implement the operators, since
those are already handled by expression template. I think only move
constructor and move assignment operator should be added for
container of uBlas.
On Sat, May 22, 2010 at 10:56 PM, Nasos Iliopoulos <nasos_i_at_[hidden]> wrote:
> in your compile options use BOOST_UBLAS_MOVE_SEMANTICS.
> (i.e. in gcc that would be -DBOOST_UBLAS_MOVE_SEMANTICS)
> I would like to make a couple of changes in the bounded types and push the
> idea to make the move_semantics default, as it seems all compilers support
> copy elision and even if they don't there is no penalty.
> see also:
> There had been some discussion in the past and I see that with the new
> standard we will be able to go even further in totally eliminating
> Take a look at this also:
>> Date: Sat, 22 May 2010 15:39:08 +0800
>> From: sth4nth_at_[hidden]
>> To: ublas_at_[hidden]
>> Subject: [ublas] rvalue reference and move
>> Since gcc 4.4 4.5 and VC2010 all support the rvalue reference, I think
>> it will be beneficial to utilize this feature to implement the move
>> semantic for those containers of uBlas. Is there any plan for this or
>> anyone doing this?
>> ublas mailing list
>> Sent to: nasos_i_at_[hidden]
> The New Busy is not the old busy. Search, chat and e-mail from your inbox.
> Get started.
> ublas mailing list
> Sent to: sth4nth_at_[hidden]