Proposal: Multidimensional opSlice solution

Fawzi Mohamed fawzi at gmx.ch
Tue Mar 9 04:35:36 PST 2010


On 9-mar-10, at 13:21, Andrei Alexandrescu wrote:

> Norbert Nemec wrote:
>> Multidimensional arrays are the essence of the interfaces of most  
>> numerical libraries. Having several incompatible standards is a  
>> major roadblock for acceptance in the numerical community.
>
> I'm not so sure about that. I was very enthusiastic about defining  
> an infrastructure of arbitary-dimensional arrays, and did a little  
> research about it. It turns out the applicability of N-dimensional  
> arrays falls off a cliff when N > 3. In turn, this is because high- 
> dimensional space are weird - an N-dimensional space is not just  
> like a 3-dimensional one, only with more dimensions; it's a  
> downright weird beast.

yes and for dense storage, and may operations, the cost is exponential  
in N, so that one normally doesn't really want to go beyond 3. Still I  
did need up to 3, and well if you go with dense storage, up to 3 or up  
to N is more or less the same amount f code if you use templates...

But for non dense storage it gets messy really quick because design  
choices really influence the api that one can use efficiently.

Fawzi



More information about the Digitalmars-d mailing list