Boost logo

Boost :

From: Benedikt Weber (weber_at_[hidden])
Date: 2002-07-01 11:17:08


"David Abrahams" <david.abrahams_at_[hidden]> wrote

> I'm not familiar enough with the implementation of uBlas to understand
> what's happening here. However, I think I proved in my recent posting that
> no temporaries are neccessary, and that you might want to *consider* using
> them for A*(B*v) to reduce the number of writes. It wasn't clear to me
> how/whether you were responding to that post, though...

I went back to that other post and finally I see how this can be done
without temporaries. I have to admitt that I was somehow fixed to the usual
evaluation of the matrix/vector product, namely the matrix_row * vector
scheme. However doing it by scaling the columns of the matrix by the vector
elements solves the problem. I am afraid I have put Joerg on the wrong track
too, sorry.

Implementing this is a different story though. As I understand, in the
asignment, the result vector asks the expression for all the elements in
turn. So the process is driven by the result vector, which makes it
difficult to apply the scheme without temporary. But Joerg should comment on
that.

Benedikt


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk