
On 02/16/12 01:17, Mathias Gaunard wrote:
On 02/16/2012 02:42 AM, Bjoern Andres wrote:
Hi everyone,
I have written a header for runtime-flexible multi-dimensional views and arrays and would love to get comments and feedback from the boost community:
tutorial code : http://tinyurl.com/7hdldc9 main website : http://www.andres.sc/marray.html doxygen reference doc: http://www.andres.sc/marray/doc/index.html git repository : https://github.com/bjoern-andres/marray tech report : http://arxiv.org/pdf/1008.2909v1
[snip] Something else, what we do in NT2 is that we use an iliffe index as described in the NRC (Numerical Recipes for C) book. This allows us to make a view that extracts an arbitrary rectangle or hypercube and to add padding between lines without extra modulo operations. How would NT2 do a transpose like the one on line 00201 of:
http://www.andres.sc/marray/doc/tutorial_8cxx_source.html ? Judging from a brief look at: http://en.wikipedia.org/wiki/Array_data_structure which suggests an iliffe data structure contains pointer to subarrays, I'd guess that would be more difficult than if a dope vector data structure, described on the same web page, were used. With a dope vector, a transpose would just mean reversing the dope vector. I'm guessing marray using something like a dope vector. However, with the iliffe data structure, I'd guess you'd have to recalculate several pointers. Right? -regards, Larry