Boost logo

Ublas :

Subject: Re: [ublas] [uBlas] Fastest way to change sing of matrix
From: dariomt (dariomt_at_[hidden])
Date: 2013-04-16 11:28:41

oswin krause <oswin.krause <at>> writes:

> oh i somehow missed the part in the bracket. sorry. While you are right
> that it strictly violates the assumption, you know that blas1 calls
> (aside from transpose) can't alias.
> >
> >> > As i assume A to be a small matrix:
> > I did say it is very large.
> >
> >> > noalias(A)=-A
> >> > fixes everything.
> > Doesn't that suggestion break the assumptions of noalias? From the docs: "If
> > you know for sure that the left hand expression and the right hand
> > expression have no common storage". Well, the lhs and the rhs both reference
> > the same matrix object!
> >
> > How is that guaranteed to work?

OK, thanks for the suggestion.

Now that I hear people talking about improving Ublas, it would be great if
Ublas could detect aliasing automagically and apply noalias() without user