From: Gavin Collings (gcollings_at_[hidden])
Date: 2000-12-09 05:25:27
--- In boost_at_[hidden], "Randy Roberts" <rroberts_at_r...> wrote:
> --- In boost_at_[hidden], Ronald Garcia <rgarcia4_at_c...> wrote:
> I think the important thing to realize here, is that us poor sm*cks
> who have to work with legacy F77 code not just need a Fortran
> **view** of an array, we need access to a pointer to the contiguous,
> Fortran-ordered array data.
Exactly how does the, admitedly sketchy, example I posted
(fortran_array) differ from what you want?
> First, if the view causes a copy of the data into a Fortran-ordered
> array (it really isn't a view, is it), then we may be faced with
> large copying overheads in both space and time.
> Second, if we were only to have a Fortran view of the array with
> iterators that gallop through the strided generalized slices of an
> underlying C-ordered C-style array, then there is no way to obtain
> from this iterator a pointer to a contiguous Fortran-ordered array.
> One would have to use something akin to std::copy(,,) into a
> temporary buffer, and we are right back to the large copying
> overheads in both space and time.
Appparently I wasn't clear enough with my intent; it doesn't work the
way you describe. The view could more accurately be described as a
C++ view on an array which uses fortran ordering for raw storage,
using the trick of reversing indices. It's not as general as your
approach, but avoids adding features. It could just as easily be
implemented as a view, as by pure wrapping.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk