EasyManua.ls Logo

Intel ARCHITECTURE IA-32 - Classes

Intel ARCHITECTURE IA-32
568 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Coding for SIMD Architectures 3
3-17
The intrinsic data types, however, are not a basic ANSI C data type, and
therefore you must observe the following usage restrictions:
Use intrinsic data types only on the left-hand side of an assignment
as a return value or as a parameter. You cannot use it with other
arithmetic expressions (for example, “
+”, “>>”).
Use intrinsic data type objects in aggregates, such as unions to
access the byte elements and structures; the address of an
__m64
object may be also used.
Use intrinsic data type data only with the MMX technology
intrinsics described in this guide
.
For complete details of the hardware instructions, see the Intel
Architecture MMX Technology Programmers Reference Manual. For
descriptions of data types, see the IA-32 Intel® Architecture Software
Developers Manual, Volumes 2A & 2B.
Classes
A set of C++ classes has been defined and available in Intel C++
Compiler to provide both a higher-level abstraction and more flexibility
for programming with MMX technology, Streaming SIMD Extensions
and Streaming SIMD Extensions 2. These classes provide an
easy-to-use and flexible interface to the intrinsic functions, allowing
developers to write more natural C++ code without worrying about
which intrinsic or assembly language instruction to use for a given
operation. Since the intrinsic functions underlie the implementation of
these C++ classes, the performance of applications using this
methodology can approach that of one using the intrinsics. Further
details on the use of these classes can be found in the Intel C++ Class
Libraries for SIMD Operations Users Guide, order number 693500.
Example 3-11 shows the C++ code using a vector class library. The
example assumes the arrays passed to the routine are already aligned to
16-byte boundaries.

Table of Contents

Related product manuals