3D Math Data structures/SIMD

Knud Soerensen 4tuu4k002 at sneakemail.com
Sat Dec 22 07:07:48 PST 2007


Hi Lukas

Lukas Pinkowski wrote:
> I'm wondering why the 2D/3D/4D-vector and -matrix data types don't find
> their way into the mainstream programming languages as builtin types?
> The only that I know of that have builtin-support are the shader languages
> (HLSL, GLSL, Cg, ...) and I suppose the VectorC/C++-compiler. Instead the
> vector- and matrix-class is coded over and over again, with different
> 3D-libraries using their own implementation/interface.
> SIMD instructions are pretty 'old' now, but the compilers support them only
> through non-portable extensions, or handwritten assembly.
> 

Take a look at the vectorization suggestion on
http://all-technology.com/eigenpolls/dwishlist/index.php?it=10
on the wishlist
http://all-technology.com/eigenpolls/dwishlist/
this would give a standard way to write array expression.

Years ago walter expresed that someting like this would be included in 2.0!

Walter is this still your opinion ?

> I think the programming language of the future should have those builtin
> instead of in myriads of libraries.
> 
> It would be nice if one of the Open Source D-compilers (GDC, LLVMDC) would
> implement such an extension to D in an experimental branch; don't know if
> it's easy to generate SIMD-code with the GCC backend, but LLVM is supposed
> to make it easy, right?
> Hopefully this extension could propagate after some time into the official D
> spec. Even if Walter won't touch the backend again, DMD could at least
> provide a software implementation (like for 64bit integer operations).

Yes, an experimental compiler where the d community could experiment
with new features is also a good idea.

I think that all that it need is for someone to do it.



More information about the Digitalmars-d mailing list