## Glas :## Re: [glas] multi-dimensional arrays? |

**From:** *plagne.laurent_at_[hidden]*

**Date:** 2006-12-14 12:23:56

**Next message:**Karl Meerbergen: "Re: [glas] multi-dimensional arrays?"**Previous message:**Ian McCulloch: "Re: [glas] multi-dimensional arrays?"**In reply to:**Ian McCulloch: "Re: [glas] multi-dimensional arrays?"**Next in thread:**Karl Meerbergen: "Re: [glas] multi-dimensional arrays?"

Hi all,

I had to developp my own lib since I could not find any libs dealing with

multi-dim vectors in the sense of Vector< Vector<..> >. Those vectors are use

with corresponding Matrix < Matrix< .. > >. (block matrices).

Such situations arise naturally when the underlying differential equations

evolves in a space that is a tensorial product of sub-spaces. For example, de

Boltzmann equation space is the phase space which can be seen as a tensorial

product of real space and momemtum space. Another example is a Cartesian 2D

space which can be seen as X \otimes Y.

In this cases, there is no problem with natural notations since a matrix vector

product A*X will leads to A(i,j)*X[j] which are again matrix vector products.

I know that the GLAS project is still in a design stage but if some of you are

interested : I made some interesting (at least for me) experiments on the

subject of Expression Template efficiency in the case of large (out of cache)

vectors (mono and multi-dim). In short my ET mecanism is specialized to use

ATLAS in the case of 1D vectors. The result is that I can type X=a*Y+b*Z (in

the multi-dim case) and I obtain results which are better that the

corresponding low level loop coding (by +/- 40 %). I also compared these

results with blitz and uBlas which (only) provides result as good as the low

level loop codes.

Regards

Laurent

**Next message:**Karl Meerbergen: "Re: [glas] multi-dimensional arrays?"**Previous message:**Ian McCulloch: "Re: [glas] multi-dimensional arrays?"**In reply to:**Ian McCulloch: "Re: [glas] multi-dimensional arrays?"**Next in thread:**Karl Meerbergen: "Re: [glas] multi-dimensional arrays?"