start on SIMD documentation

Peter Alexander peter.alexander.au at gmail.com
Fri Jan 13 12:27:44 PST 2012


On 13/01/12 8:02 PM, Mehrdad wrote:
> On 1/13/2012 11:06 AM, Peter Alexander wrote:
>> On 13/01/12 8:39 AM, Walter Bright wrote:
>>> https://github.com/D-Programming-Language/d-programming-language.org/blob/master/simd.dd
>>>
>>>
>>>
>>> and core.simd:
>>>
>>> https://github.com/D-Programming-Language/druntime/blob/master/src/core/simd.d
>>>
>>>
>>
>> Nice!
>>
>> Although...
>>
>> import core.simd;
>> void main()
>> {
>> float4 a = void; // float a; doesn't work either
>> a = simd(XMM.PXOR, a);
>> }
>
> Er... is there any reason why we're using such a cryptic PXOR value
> instead of operator overloading?

I imagine Walter will add the operator overloads later.

The simd(op, ...) syntax is more flexible though because it allows you 
to select instructions that don't directly map to any standard operator 
(e.g. shuffles).


More information about the Digitalmars-d mailing list