25 Mar
2010
25 Mar
'10
7:38 p.m.
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