Boost logo

Ublas :

From: Peter Schmitteckert (peter_at_[hidden])
Date: 2005-12-29 02:14:39


Dear Chris Harris,

On Wed, 28 Dec 2005, Harris, Chris GOSS EXT wrote:

> Maybe matrix should behave like std::vector and always default
> initialize its values.

In many applications one first allocates a matrix,
and then either fills it directly by elements,
or more often by some linear algebra operation.

Initializing a matrix and discarding these values
by overwriting them directly is a waste of CPU cycles / memory band width,
and it leads to a reduced FLOP/cycle count.
And since there are users who of ublas which run their application on
supercomputers, where hardware counter measure and monitor/account
the FLOPs per cycle, unneccessary initialisation should be avoided.

Best regards,
Peter

_______________________________________

Dr. Peter Schmitteckert
TKM / CFN University of Karlsruhe
++49 721 608 3363