|
Boost : |
From: Ronald Garcia (garcia_at_[hidden])
Date: 2003-10-29 18:02:44
Joerg Walter wrote:
>----- Original Message -----
>From: "Ronald Garcia" <garcia_at_[hidden]>
>To: "Boost mailing list" <boost_at_[hidden]>
>Sent: Wednesday, October 29, 2003 5:26 AM
>Subject: Re: [boost] Re: multi_array resize?
>
>[...]
>
>
>
>>It turns out that muti_array DOES have a resize operation. It is
>>described in the reference documentation, and unfortunately, the user
>>documentation has been in dire need of a rewrite for some time now.
>>This work is partly done, but is currently on hold (my apologies).
>>I hope to return to that endeavor shortly.
>>
>>
>
>I've recently started to write ublas adaptors for multi_array and its views.
>A couple of observations/questions:
>
>- it probably would be a bit easier to adapt multi_array if it would be
>default constructible
>
>
Yes. As it happens, I added support for a default-constructible
multi_array at the same time as I added the resize operation. Resizing
and default construction seemed tied together.
>- I don't like the necessity very much to 'typedef' multi_array's range
>- how does one distinguish multi_arrays from multi_array_views generically?
>
>
>
Currently there is no mechanism for doing so. When is this
functionality useful?
>And one from Kresimir Fresl:
>- how does one distinguish C storage and Fortran storage layout generically?
>
>
>
Since the storage layout is not part of an array's type, you cannot
distinguish the two generically (assuming that by generically you mean
"at compile time"). The multi_array has a storage_order member function
that returns the storage order object. This can be used at runtime to
determine the storage order of an array, though it is expressed in a
more general form than C or Fortran storage order.
Hope this helps,
ron
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk