start on SIMD documentation
Sean Cavanaugh
WorksOnMyMachine at gmail.com
Sat Jan 14 21:15:53 PST 2012
What about the 256 bit types that are already present in AVX instruction
set?
I've written a several C++ based SIMD math libraries (for SSE2 up
through AVX), and PPC's VMX instruction sets that you can find on game
consoles.
The variable type naming is probably the most annoying thing to work out.
For HLSL they use float, float1, float2, float3, float4 and int, uint
and double versions, and this convention works out quite well until you
start having to deal with smaller integer types or FP16 half floats.
However on the CPU side of things there are signed and unsigned 8, 16,
32, 64 and 128 bit values. It gets even more complicated in that not
all the math operations or comparisons are supported on the non-32 bit
types. The hardware is really designed for you to pack and unpack the
smaller types to 32 bit do the work and pack the results back, and the
64 bit integer support is also a bit spotty (esp wrt multiply and divide).
On 1/13/2012 2:57 PM, bearophile wrote:
> Walter:
>
>> What's our vector, Victor?
>> http://www.youtube.com/watch?v=fVq4_HhBK8Y
>
> Thank you Walter :-)
>
>
>> If int4 is out, I'd prefer something like vint4. Something short.
>
> Current names:
>
> void16
> double2
> float4
> byte16
> ubyte16
> short8
> ushort8
> int4
> uint4
> long2
>
> Your suggestion:
>
> vvoid16
> vdouble2
> vfloat4
> vbyte16
> vubyte16
> vshort8
> vushort8
> vint4
> vuint4
> vlong2
>
>
> My suggestion:
>
> void16v
> double2v
> float4v
> byte16v
> ubyte16v
> short8v
> ushort8v
> int4v
> uint4v
> long2v
>
> Bye,
> bearophile
More information about the Digitalmars-d
mailing list