|
Boost : |
Subject: Re: [boost] Interest in multi-dimensional array class templates.
From: Brian Smith (bjs3141_at_[hidden])
Date: 2011-06-20 14:13:31
On 6/20/11, Phil Bouchard <philippe_at_[hidden]> wrote:
> On 6/19/2011 4:57 PM, Brian Smith wrote:
>> On 6/19/11, Mathias Gaunard<mathias.gaunard_at_[hidden]> wrote:
>>
>>> 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.
>
> How is the iteration implemented? One iterator for each dimension or
> one general iterator that goes thru all elements sequentially?
>
>
One general iterator that goes through the data elements sequentially.
The begin and end methods return the address of the first and one past
the last data element as expected. The idea of the view is that the
addresses of arbitrary sequences of data elements from an array can be
stored then iterated over sequentially using the iterator associated
with the view, also general and accessible using its begin and end
methods. Although a view is itself an array of the same dimensionality
as the array we want to iterate over, they're relatively easy to set
up, cost little in book-keeping, and performed better than the
iterator classes I had implemented.
Brian
> _______________________________________________
> 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