Boost logo

Boost :

Subject: Re: [boost] Interest in multi-dimensional array class templates.
From: Brian Smith (bjs3141_at_[hidden])
Date: 2011-06-20 14:28:20


On 6/20/11, Mathias Gaunard <mathias.gaunard_at_[hidden]> wrote:
> On 19/06/2011 22:57, Brian Smith wrote:
>
>>> Can I have a view of part of the array? Can I easily linearize or
>>> reshape it?
>>>
>> Yes. If you mean by linearization, can it be allocated with a single
>> memory request then no. I did write such a type and it was pretty
>> efficient but I removed it. Reshaping a view is possible though.
>
> No, I mean an operation that linearizes the element in a 1-dimensional
> structure.
>
No.

>>> Given another N-dimensional array whose values are positions, can I
>>> obtain the array of the values accessed at the given positions?
>>>
>> With some effort on your behalf yes.
>
> It should be easy to use.
>
Ok then with a little bit of effort on your behalf.

>>> How does it integrate with range and iterators?
>>>
>> Iterators we're also implemented as separate classes then removed in
>> favour of the view. The reason being they proved detremental to
>> performance, maybe an implementation detail, nevertheless for the time
>> being their gone. Ranges are a part of the view and iterators returned
>> by classes are good old fashioned pointers that are owned by class
>> that returns them.
>
> If you had performance problems, maybe you did it wrong.
>
Well deduced Sherlock but I said that.

> Both outer dimension iteration and linear iteration are necessary to have.
>
Why?

_______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>

-- 
www.maidsafe.net

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk