Upcoming Events
Unite 2010
11/10 - 11/12 @ Montréal, Canada

GDC China
12/5 - 12/7 @ Shanghai, China

Asia Game Show 2010
12/24 - 12/27  

GDC 2011
2/28 - 3/4 @ San Francisco, CA

More events...
Quick Stats
89 people currently visiting GDNet.
2406 articles in the reference section.

Help us fight cancer!
Join SETI Team GDNet!
Link to us Events 4 Gamers
Intel sponsors gamedev.net search:

  Contents

 Introduction
 MMX
 3DNow! and
 Streaming SIMD

 Some Examples

 Get VectorC
 Printable version

 


3DNow!

3DNow! was designed by AMD as an extension to MMX to support single-precision floating-point arithmetic, which is used in a lot of 3D games. It uses the MMX registers but adds new floating-point instructions that can operate on 1 or 2 single-precision floating-point values at a time. Because MMX and the normal floating-point registers cannot be used in the same area of code, 3DNow! can only be used in areas of code whose only floating-point operations are within 3DNow's features.

3DNow! supports: addition, subtraction, multiplication, division, negation, absolute, comparison, conversion to-and-from integers and reciprocal square root. It is also possible to compute division and reciprocal square root to just 12-bit precision for extra speed.

Streaming SIMD Extensions

Streaming SIMD Extensions (SSE) were designed by Intel and are available in its Pentium III processor and are also available in the newest Celeron processors. These new instructions add 8 new 128-bit registers which do not suffer from MMX's restriction on mixing with FPU (floating-point unit) code. However, operating system support is required (Windows 95 has it and Windows NT4 can have it added with a service pack). SSE instructions operate on 1 or 4 single-precision floating-point values.

SSE supports: addition, subtraction, multiplication, division, negation, absolute, square root, comparison, conversion to-and-from integers and reciprocal square root. It is also possible to compute division and reciprocal square root to just 12-bit precision for extra speed.

Both 3DNow! and Streaming SIMD Extensions can operate on normal single-precision floating point values, so the compiler doesn't need to vectorize its code to get a speed increase. However, under some circumstances, SSE can be slower when operating on single floats than the normal FPU code! I don't yet know exactly when this is the case, so watch out, you may recompile your code for SSE and find it is slower. If you follow the tips given for vectorization, it may speed up considerably, or you may want to put this code in a separate source file that is compiled without SSE support.




Next : Some Examples