<div class="gmail_quote">On 6 January 2012 04:40, Iain Buclaw <span dir="ltr"><<a href="mailto:ibuclaw@ubuntu.com">ibuclaw@ubuntu.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">It is a fine start to support with a float128 type. :)</div></div>

<br>
With vectors, there are around 20 tied to the x86 architecture iirc,<br>
to whom's base types cover D equivalents of: byte, ubyte, short,<br>
ushort, int, uint, long, ulong, float and double.  I think for<br>
consistent naming convention, much like 'c' is used to denote complex<br>
types, I think 'v' should be used to denote vector types.  For<br>
example, the types available on x86 will be:<br>
<br>
64bits:<br>
vfloat[2], vlong[1], vint[2], vshort[4], vbyte[8]<br>
<br>
128bits:<br>
vdouble[2], vfloat[4], vlong[2], vint[4], vshort[8], vbyte[16],<br>
vulong[2], vuint[4], vushort[8], vubyte[16]<br>
<br>
256bits:<br>
vdouble[4], vfloat[8], vlong[4], vint[8], vshort[16], vbyte[32]<br>
<br>
<br>
For portability, vectors should be defined with the following logic:For example:<br>
<br>
* vector size cannot be zero<br>
* vector size must be a power of 2.<br>
* if there is no hardware support for the vector type/size, then fall<br>
back to static array type of same size.<br>
* defining a vector without a size ie: vint foo;  will default the<br>
size to zero, which will error.<br>

<br>
That's all I can think of so far.</blockquote><div><br></div><div>I'm confused, are you advocating using arrays of primitive types to express SIMD values again? Why are you using the square brackets in your example?</div>
<div><br></div><div>I think starting with float128 is wrong. SIMD registers aren't necessarily floats. The default (language implemented) type should be typeless, and allow libraries to build typed api's on top of that.</div>
<div>The only thing the language needs to think about is a single typeless, 128bit, 16 byte aligned value.</div></div>