Intel ARCHITECTURE IA-32 Reference Manual page 206

Architecture optimization
Table of Contents

Advertisement

IA-32 Intel® Architecture Optimization
In C++ (but not in C) it is also possible to force the alignment of a
/
class
struct __declspec(align(16)) my_m128
{
};
But, if the data in such a
SIMD Extensions or Streaming SIMD Extensions 2, it is preferable to
use a
union
used to make this more convenient:
class my_m128 {
};
In this example, because the
can be used as immediate member names of
__declspec(align)
union
Alignment by Using
performance, the compiler will align routines with
data to 16-bytes by default. The command-line switch,
can be used to limit the compiler to only align in routines that contain
128-bit data. The default behavior is to use
to align routines with 8- or 16-byte data types to 16-bytes.
For more details, see relevant Intel application notes in the Intel
Architecture Performance Training Center provided with the SDK and
the Intel® C++ Compiler User's Guide.
3-26
/
type, as in the code that follows:
struct
union
float f[4];
to make this explicit. In C++, an anonymous
union {
__m128 m;
float f[4];
};
has no effect when applied to a
member in either C or C++.
__m64
is going to be used with the Streaming
class
is anonymous, the names,
union
or
Data. In some cases, for better
double
union
. Note that
my__m128
,
class
or
__m64
-Qsfalign16
, which instructs
-Qsfalign8
can be
and
,
m
f
, or
struct
double
,

Advertisement

Table of Contents
loading

Table of Contents