Boost logo

Ublas :

From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2005-01-17 06:11:58


Jan Bouecke wrote:
> Hi
> The following line has compiled and worked corect until I changed to gcc
> 3.4.2 and boost 1.32.
>
> I am working under fedora core 3.
> ...
> matrix<double> m(3,3);
> cout << prod(prod(m,m),m) << std::endl;

nested prod's are not allowed anymore for a long time now because the
second prod will be recalculated for every element that needs to be
calculated. So it's better to explicitly create a temporary to hold the
result of the first prod.