start on SIMD documentation

Iain Buclaw ibuclaw at ubuntu.com
Fri Jan 13 11:18:27 PST 2012


On 13 January 2012 19:06, Peter Alexander <peter.alexander.au at gmail.com> 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);
> }
>
> *** Internal error: backend/cgcod.c 2048 ***
>
> Are all those instructions implemented? I seem to get the same for all
> instructions.
>
> Also, slight bikeshedding issue: I'm not so sure on using names like int4
> for vectors. You see things like int32 a lot to mean a 32-bit integer, or
> int8 to mean an 8-bit integer. Using this notation for vectors may be
> confusing.
>
> As for what to change it to, I don't really care. int4v, vec_int4,
> int_vector4, anything. It doesn't matter.
>

This is probably intelligable, but makes sense to me.

Change   int4  ->  v4si

Vector names that reflect the MODE they represent, rather than the TYPE.


Regards
-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';


More information about the Digitalmars-d mailing list