|
Boost Users : |
Subject: Re: [Boost-users] [multiarray] Obtain MultiArray implementation instance from base, extents, strides
From: Rhys Ulerich (rhys.ulerich_at_[hidden])
Date: 2010-03-25 15:38:55
> I'd like to obtain an N-dimensional MultiArray implementation given a
> base pointer, N extents, and N strides. My use case requires padding
> the stride in one dimension in a way seemingly not obtainable taking
> views of the usual boost::multi_array_ref.
>
> ...
>
> Am I missing something in Boost.MultiArray? Or is there no publicly
> accessible way to provide a custom stride list?
I was missing something. boost::multi_array_ref maintains its stride
information in a protected member named stride_list_. Subclass
multi_array_ref and manipulate stride_list_ directly. Still not
pretty, but much better than the other kludges I'd suggested.
- Rhys
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net