suggestion: basic SIMD types modelled after Cg/HLSL
Andrei Khropov
andkhropov at nospam_mtu-net.ru
Thu Jul 13 04:31:00 PDT 2006
cschueler wrote:
> you'd obviate the need for a large number of people (basically
> the non-scientific crowd) to write their own matrix/vector classes and give
> them a familiar syntax to boot.
As D is quite popular among game developers why not include these classes into
the standard library?
There's a project
http://www.dsource.org/projects/helix
that contains this functionality.
With some templates/conditional compilation trickery it can be extended to
optionally use SIMD instructions.
>
> I'd envision that a sufficiently endowed compiler could generate code for the
> laguage features even if the target platform has no SIMD hardware; much in the
> same spirit of a float-emulator when native hardware is not available.
>
> Anyway, these are only points to kick off a discussion. Obvioulsy I'd like D
> to move into a direction where it is useful for me (As you may infer from my
> other posts :) )
Well, I believe matrices and vectors and simple operations on them should be
built-in into the language anyway (well, at the present moment it's a beyond
1.0 feature).
IMHO using SIMD for these operations is a matter of compiler optimization.
I'm not a compiler writer however so I can't judge how tough it is to implement.
--
AKhropov
More information about the Digitalmars-d
mailing list