Intel ARCHITECTURE IA-32 User Manual Page 192

  • Download
  • Add to my manuals
  • Print
  • Page
    / 568
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 191
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.
Page view 191
1 2 ... 187 188 189 190 191 192 193 194 195 196 197 ... 567 568

Comments to this Manuals

No comments