Boost logo

Boost :

From: Helmut Zeisel (HZ2012_at_[hidden])
Date: 2022-01-07 07:11:11


> Von: "Seth via Boost" <boost_at_[hidden]>
> On Thu, Jan 6, 2022, at 7:47 AM, Helmut Zeisel via Boost wrote:
> > To avoid further reinventing the wheel: is there some multi dimensional
> > array index adapter available in boost or in some other free librarry?
> >
> > Helmut
>
> Other than boost::multi_array_ref I posted earlier in this conversation (https://godbolt.org/z/o4x6vGhW5) - I don't really know. Is there something wrong with that one, though?
>
>Seth

I do not know whether boost::multi_array_ref is suitable fpr the purposes of the original question.

For more general applications, according to my current understanding, boost::multi_array_ref has several restrictions:

1) boost::multi_array_ref does not own the memory (which creates at least the memory overhead of one pointer)
2) boost::multi_array_ref is not constexpr (maybe this can be fixed)
3) boost::multi_array_ref only works for a contiguous block of elements
4) boost::multi_array_ref supports only rectangular shapes (no other shapres like e.g. triangular matrices)

Helmut


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