Boost logo

Boost :

From: Benedikt Weber (weber_at_[hidden])
Date: 2002-07-02 13:51:45


I just want to remind you that there are many other expressions like A*( B *
(C * v)) or norm_2(A * (B * v)) that should also evaluate efficiently.
Avoiding temporaries in all cases looks like a real challange, if it's
possible at all.


"Joerg Walter" <jhr.walter_at_[hidden]> wrote

> I think, I've understood, that you propose to evaluate A * (B * v) via
> r.clear ();
> for (unsigned j = 0; j < r.size (); ++ j)
> r.plus_assign (column (A, j) * prod (B, v) (j));
> May be we even could defer the loop evaluation via some lambda construct.
> I've two problems with this approach: I'm not sure if the results of the
> different evaluation path couldn't surprise a client of ublas. And I
> currently don't know, how this optimization generalizes to matrix chain
> multiplication and other expressions.

Boost list run by bdawes at, gregod at, cpdaniel at, john at