Boost logo

Boost :

Subject: Re: [boost] [range] flat_array_view feature request.
From: Mostafa (mostafa_working_away_at_[hidden])
Date: 2014-01-08 07:38:41


On Fri, 03 Jan 2014 09:28:09 -0800, Nathan Ridge <zeratul976_at_[hidden]>
wrote:

>> On Fri, Jan 03, 2014 at 03:13:26AM -0800, Mostafa wrote:
>>> I think having a flat_array_view adapter in boost would be helpful.
>>> Something along the lines of
>>> https://github.com/m-w-a/sandbox/blob/master/flat_array_view.cc What
>>> do the
>>> maintainer(s) of Range and others think?
>
> I think that would be useful.
>
> Can it be generalized to work for any range of ranges,
> not just arrays?

I think so. Though I don't know when I'll have time to make a proof of
concept. I have to understand the compile time/run time characteristics of
the naive implementation I have in mind (which is one along the lines of
what John M. Dlugosz proposed). I haven't even considered the coroutines
approach route mentioned by Nat Goodspeed.

Additionally, what about ranges of range that collapses to a contiguous
chunk of memory? Should/can all use cases be detected (and optimized for)?
For example, if the join implementation was used, then a 4x3
multidimensional array doesn't need the intermediate end of range checks
since we're dealing with contiguous memory. What about boost:arrayS of
boost::array, etc...?

Mostafa


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