Subject: Re: [boost] [proto] transforms && rvalue refs
From: troy d. straszheim (troy_at_[hidden])
Date: 2009-03-30 13:30:58
Joel Falcou wrote:
> troy d. straszheim a écrit :
>> When it is time to evaluate the expression, the grammar fires the
>> transform for exp(B) first. It creates a temporary T with the same
>> dimensions as B and and a function is called to compute the result
>> into T. Now 'T * C' happens. In this case there is an available
>> temporary, 'T', so the result can go right in to T. T is returned and
>> moved in to A. Done... at least, that's the idea.
> No, when you evaluate the expression, you iterate via a for loop nest
> over the elements of all array, recursively calling the elementwise
> version of exp and *. The context just evaluate one element at a time.
> In the end, the only temporary created are those from the elementwise
> function return.
That's the point... you can't do that here. The elements behind A B
and C are on the other end of a very slow bus.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk