SSE in D
Trass3r
un at known.com
Sat Oct 2 14:54:21 PDT 2010
Am 02.10.2010, 15:23 Uhr, schrieb Emil Madsen <sovende at gmail.com>:
> Is there a D equivalent of the "xmmintrin.h", or any other convenient
> way of
> doing SSE in D?
> - I've been looking into the Array Operators, but will those work, for
> instance if I'm doing something alike:
> a[3], b[4]
> c[4] = a+b;
> and when will the compiler write SSE asm for the array operators? - is
> there
> a target=architecture for the compiler? or will it simply write SSE if
> one
> defines something alike -msse4? - I'm having a bit of trouble finding
> stuff
> about SSE for D, sources on the subject anyone?
>
SSE is supported in inline assembly.
dmd's backend doesn't automatically vectorize code.
gdc and ldc are theoretically able to it (cause of the backends they use)
but I don't know to what extent they really do in practice.
Array operations leverage prewritten optimized SSE code if possible.
See Array operations section of
http://www.digitalmars.com/d/2.0/arrays.html
More information about the Digitalmars-d
mailing list