Boost logo

Glas :

Re: [glas] MTL3 design ? [was MTL project site is up]

From: David Abrahams (dave_at_[hidden])
Date: 2005-02-03 10:52:20

"Russell Smiley" <smiley_at_[hidden]> writes:

>> The most important question is do we want vectors to be resized. I do
>> not think so.
> I have to agree. If the goal of MTL3 is relatively high performance
> then vector/matrix resizing is probably not a good idea.

Will someone please justify this claim? AFAICT it has no basis in
reality, but people keep making it.

> On the other hand one of the powerful and useful aspects of Matlab,
> for example, is the dynamic matrix/vector resizing.
> Could we not have a template specialisation, or something, that
> might allow for vector resizing in the future, at least.
> For example, I'm imagining something like:
> Vector<float, nonresizeable> a;
> Vector<float, resizeable> b;

I have already said that I will not introduce a policy parameter
unless someone can show that the added complexity is balanced by some
other factor.

> I have found resizeable vectors and matrices useful in modified
> nodal analysis circuit simulation where you don't know before
> analysing the circuit graph how large the system of equations
> is. Once the circuit is analysed and you are about to simulate the
> system of equations is static and at that point it would be useful
> to have nonresizeable vectors for computational efficiency.

If you can show that there's a real efficiency gain, I'll be inclined
to consider it. Until then, I just don't see it.

Dave Abrahams
Boost Consulting