Boost logo

Boost Users :

Subject: Re: [Boost-users] [multi_array] operator= requires resize - why?
From: Etienne Bresciani (etienne.bresciani_at_[hidden])
Date: 2012-06-04 10:05:32


Rhys Ulerich-2 wrote:
> A total guess... You have two 4D multi_arrays used in an algorithm.
> Algorithm checks that their fastest dimension has the same size. It
> does. The algorithm is called recursively on a 3D subproblem. The
> algorithm checks that the two 3D sub-multi_arrays have a fastest
> dimension with the same size. They don't. Now what should the
> generic algorithm do? If it resizes the 3D subproblem bad things
> happen to the original 4D multi_array.

I completely understand that many generic algorithms require that sizes
match. And we agree on that they should not resize any of the
(sub-)multi_array. But I'm afraid this is missing the point. My feeling
is that generic algorithm should check that the sizes match if it
requires so, NOT the assignment operator. What the assignment operator
should require seems largely independent to me.

Etienne

--
View this message in context: http://boost.2283326.n4.nabble.com/multi-array-operator-requires-resize-why-tp2563752p4630885.html
Sent from the Boost - Users mailing list archive at Nabble.com.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net