IA-32 Intel® Architecture Optimization
3-12
costly application processing time. However, these routines have
potential for increased performance when you convert them to use one
of the SIMD technologies.
Once you identify your opportunities for using a SIMD technology, you
must evaluate what should be done to determine whether the current
algorithm or a modified one will ensure the best performance.
Coding Techniques
The SIMD features of SSE3, SSE2, SSE, and MMX technology require
new methods of coding algorithms. One of them is vectorization.
Vectorization is the process of transforming sequentially-executing, or
scalar, code into code that can execute in parallel, taking advantage of the
SIMD architecture parallelism.
This section discusses the coding
techniques available for an application to make use of the SIMD
architecture.
To vectorize your code and thus take advantage of the SIMD
architecture, do the following:
•
Determine if the memory accesses have dependencies that would
prevent parallel execution.
•
“Strip-mine” the inner loop to reduce the iteration count by the
length of the SIMD operations (for example, four for
single-precision floating-point SIMD, eight for 16-bit integer SIMD
on the XMM registers).
•
Re-code the loop with the SIMD instructions.
Each of these actions is discussed in detail in the subsequent sections of
this chapter. These sections also discuss enabling automatic
vectorization via the Intel C++ Compiler.
Summary of Contents for ARCHITECTURE IA-32
Page 1: ...IA 32 Intel Architecture Optimization Reference Manual Order Number 248966 013US April 2006...
Page 220: ...IA 32 Intel Architecture Optimization 3 40...
Page 434: ...IA 32 Intel Architecture Optimization 9 20...
Page 514: ...IA 32 Intel Architecture Optimization B 60...
Page 536: ...IA 32 Intel Architecture Optimization C 22...