SIMD support...

Brad Roberts braddr at puremagic.com
Fri Jan 6 10:25:53 PST 2012


On 1/6/2012 12:43 AM, Walter Bright wrote:
> Declare one new basic type:
> 
>     __v128
> 
> which represents the 16 byte aligned 128 bit vector type. The only operations defined to work on it would be
> construction and assignment. The __ prefix signals that it is non-portable.
> 
> Then, have:
> 
>    import core.simd;
> 
> which provides two functions:
> 
>    __v128 simdop(operator, __v128 op1);
>    __v128 simdop(operator, __v128 op1, __v128 op2);

How is making __v128 a builtin type better than defining it as:

align(16) struct __v128
{
    ubyte[16] data;
}



More information about the Digitalmars-d mailing list