Boost logo

Boost :

Subject: Re: [boost] Preliminary submission: generic linear algebra algorithms library Boost LA
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2009-10-23 06:28:53

Emil Dotchevski wrote:
> Thomas Klimpel wrote:
> > Providing wrappers for T[D1][D2][D3] and T[D1][D2][D3][D4] , ...,  T[D1][D2][D3][D4][D5][D6][D7][D8][D9] might also be useful sometimes (and the code generators might help here...), but this is the question of the scope of the library again.
> I'm not sure why we're talking about 3D arrays,
> those can't possibly represent vectors or matrices.

I completely agree that a 3D array can't possibly represent vectors or matrices. The wrapper for "T[D1][D2][D3]" would be "la::ten3<T, D1, D2, D3>", and its traits would be ten3_traits, and the wrapper for T[D1][D2][D3][D4][D5][D6][D7][D8][D9] would be "la::ten9<T, D1, D2, D3, D4, D5, D6, D7, D8, D9]>". The reason we are talking about 3D arrays is that the C++ language has fixed-size higher dimensional multi_arrays, but only very limited language support for them.

Now I have no strong opinions about whether there is a need for such wrappers or not. I searched my source code for occurrences of higher dimensional fixed size arrays, and found only very few occurrences. The occurrences were of the type float points[2][2][2] and float derivatives[2][2][2][3], and represented values in the corners of the unit-cube.

Just tell me that higher dimensional tensors are clearly out of scope of the library, and everything is fine.


Boost list run by bdawes at, gregod at, cpdaniel at, john at