setting the speed for the future of games programming |
||||||||||||||||||||||||||||||||||
STREAMING SIMD EXTENSIONSIntel's Streaming SIMD Extensions (SSE) is a set of new processor instructions added to the Pentium III processor. The new instructions perform single-precision floating-point operations on values in a new set of 128-bit registers. These new registers do not have the restrictions of MMX, but they do require operating system support. This support is available in Windows 95 and Windows NT (with a service pack).The SSE instructions can operate on types:-
Floating-point operations carried out in SSE registers will not produce exactly the same results in all circumstances as that of normal floating-point code. If 2 versions of your program must produce exactly the same results, you should enable consistent precision. SSE is ideal for multiplying vectors and matrices as well as 3D projection. It can also be used with MMX for image and sound processing using floating-point intermediates. Streaming SIMD Extensions use a different control register. So exceptions and rounding conditions have to be set differently to normal floating-point code. Also (unlike the FPU) SSE has a convert to integer with round to zero (as defined in C). 16-byte alignment is required for most SSE instructions. If VectorC incorrectly assumes 16-byte alignment, you will get alignment exceptions. Also, unaligned memory accesses are significantly slower than aligned accesses. Operations Supported by Streaming SIMD ExtensionsArithmetic - addition, subtraction, multiplication and division on floats or float vectorse.g.
Reciprocal 12-bit precision - floats and float vectorsVectorC will also do 12-bit division by calculating the reciprocal of the right hand side and multiplying by the left hand side.e.g.
Reciprocal Square Root - 12-bit precision float and float vector.The "sqrt" function in "math.h" is declared with doubles. Doubles cannot be processed with SSE, so you can either declare your own version of "sqrt", or use the command-line switch "/vec:single" or "/single". This will use a "float" version of "sqrt" if the argument is a float. e.g.
Square Root - float and float vector.The "sqrt" function in "math.h" is declared with doubles. Doubles cannot be processed with SSE, so you can either declare your own version of "sqrt", or use the command-line switch "/vec:single" or "/single". This will use a "float" version of "sqrt" if the argument is a float. e.g.
Conversion to or from 32-bit signed integer or 2-element signed 32-bit integer vectorWhen converting to or from integer values, only 2 elements can be converted at a time and the integer vector will be in an MMX register.e.g.
Minimum and Maximum - floats or float vectorse.g.
Absolute and Negate - floats and float vectorsThe SSE logical instructions can be used to negate floats and calculate the absolute (positive) values. Conditional Move - float, float vectorsIt is possible to conditional assignments on vectors using a sequence of instructions without branching. This can be much faster than branching (which can be very slow on modern processors). e.g.
Set Bit Mask - 4-bit from float vectore.g.
PrefetchingPrefetching is available on processors with SSE
support.
|
||||||||||||||||||||||||||||||||||