Boost logo

Boost :

Subject: Re: [boost] RFC: runtime-flexible arrays
From: Larry Evans (cppljevans_at_[hidden])
Date: 2012-02-15 21:59:38


On 02/15/12 19:42, 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
>
> Unlike in Boost.MultiArray, the dimension of arrays is not a template
> parameter in Marray. Other features include
>
> - runtime-flexible dimension, shape, size and indexing order (first or
> last coordinate major order)
> - arithmetic operators with automatic type promotion and expression
> templates.
> - access to entries via coordinates, scalar indices and STL-compliant
> random access iterators.
> - derived classes for matrices and vectors
> - support of exchangeable STL-compliant allocators.
>
> Thanks for your consideration
> Bjoern

This sounds somewhat like:

http://svn.boost.org/svn/boost/sandbox/variadic_templates/sandbox/stepper/boost/array_stepper/array_dyn.hpp

with these several extra features:

> - arithmetic operators with automatic type promotion and expression
> templates.
> - access to entries via coordinates, scalar indices and STL-compliant
> random access iterators.
> - derived classes for matrices and vectors
> - support of exchangeable STL-compliant allocators.

However, array_dyn has the ability to permute its axes (an array
transpose is just a reverse of the axes). Demonstration of an
application of such a permutation of axes (well, actually, a
rotation of the axes) is here:

http://svn.boost.org/svn/boost/sandbox/variadic_templates/sandbox/stepper/libs/array_stepper/examples/solve_tridiag_rotated.cpp

and a more useful example is here:

http://svn.boost.org/svn/boost/sandbox/variadic_templates/sandbox/stepper/libs/array_stepper/examples/array_dyn.diff_pde.cpp

That last array_dyn code was made in response to post:

http://article.gmane.org/gmane.comp.lib.boost.user/68017/match=multi+array+pdes

-regards,
Larry


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