Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2005-06-17 05:47:51


On Friday 17 June 2005 10:43, Michael Stevens wrote:
> Guys,
>
> On Thursday 16 June 2005 21:00, Gunter Winkler wrote:
> > Am Donnerstag, 16. Juni 2005 13:10 schrieb Toon Knapen:
> > > IMHO the way to have both is as I have described below: we know that
> > > in uBLAS different containers are never aliased. Aliasing only occurs
> > > when one is working with views.
> > >
> > > So from the moment only containers
> > > are used in an expression, the expression engine can safely assume
> > > there is no aliasing.
>
> ??? I'm still not sure we are on the same wavelength with regard to
> aliases. Hopefully the following is correct.

in order to give an example:

double alpha;
Vector x;
Matrix A;
x += alpha * inner_prod( x, prod(A, x) );

Now ask yourself: Do we need a temporary or not? So it is really hard to find
out wether an expression aliases the lvalue or not.

mfg
Gunter