<s>
AltiVec	B-General_Concept
is	O
a	O
single-precision	O
floating	B-Algorithm
point	I-Algorithm
and	O
integer	O
SIMD	B-Device
instruction	B-General_Concept
set	I-General_Concept
designed	O
and	O
owned	O
by	O
Apple	O
,	O
IBM	O
,	O
and	O
Freescale	O
Semiconductor	O
(	O
formerly	O
Motorola	O
's	O
Semiconductor	O
Products	O
Sector	O
)	O
the	O
AIM	O
alliance	O
.	O
</s>
<s>
It	O
is	O
implemented	O
on	O
versions	O
of	O
the	O
PowerPC	B-Architecture
processor	I-Architecture
architecture	O
,	O
including	O
Motorola	O
's	O
G4	B-General_Concept
,	O
IBM	O
's	O
G5	B-General_Concept
and	O
POWER6	B-Device
processors	O
,	O
and	O
P.A.	O
</s>
<s>
Semi	O
's	O
PWRficient	B-General_Concept
PA6T	B-General_Concept
.	O
</s>
<s>
AltiVec	B-General_Concept
is	O
a	O
trademark	O
owned	O
solely	O
by	O
Freescale	O
,	O
so	O
the	O
system	O
is	O
also	O
referred	O
to	O
as	O
Velocity	B-General_Concept
Engine	I-General_Concept
by	O
Apple	O
and	O
VMX	O
(	O
Vector	B-General_Concept
Multimedia	I-General_Concept
Extension	I-General_Concept
)	O
by	O
IBM	O
and	O
P.A.	O
</s>
<s>
While	O
AltiVec	B-General_Concept
refers	O
to	O
an	O
instruction	B-General_Concept
set	I-General_Concept
,	O
the	O
implementations	O
in	O
CPUs	O
produced	O
by	O
IBM	O
and	O
Motorola	O
are	O
separate	O
in	O
terms	O
of	O
logic	O
design	O
.	O
</s>
<s>
To	O
date	O
,	O
no	O
IBM	O
core	O
has	O
included	O
an	O
AltiVec	B-General_Concept
logic	O
design	O
licensed	O
from	O
Motorola	O
or	O
vice	O
versa	O
.	O
</s>
<s>
AltiVec	B-General_Concept
is	O
a	O
standard	O
part	O
of	O
the	O
Power	O
ISA	O
v.2.03	O
specification	O
.	O
</s>
<s>
Both	O
VMX/AltiVec	O
and	O
SSE	B-General_Concept
feature	O
128-bit	O
vector	B-Operating_System
registers	O
that	O
can	O
represent	O
sixteen	O
8-bit	O
signed	O
or	O
unsigned	O
chars	O
,	O
eight	O
16-bit	O
signed	O
or	O
unsigned	O
shorts	O
,	O
four	O
32-bit	O
ints	O
or	O
four	O
32-bit	O
floating-point	B-Algorithm
variables	O
.	O
</s>
<s>
Both	O
provide	O
cache-control	O
instructions	O
intended	O
to	O
minimize	O
cache	B-General_Concept
pollution	I-General_Concept
when	O
working	O
on	O
streams	O
of	O
data	O
.	O
</s>
<s>
Unlike	O
SSE2	B-General_Concept
,	O
VMX/AltiVec	O
supports	O
a	O
special	O
RGB	O
"	O
pixel	B-Algorithm
"	O
data	O
type	O
,	O
but	O
it	O
does	O
not	O
operate	O
on	O
64-bit	O
double-precision	O
floats	B-Algorithm
,	O
and	O
there	O
is	O
no	O
way	O
to	O
move	O
data	O
directly	O
between	O
scalar	O
and	O
vector	B-Operating_System
registers	O
.	O
</s>
<s>
In	O
keeping	O
with	O
the	O
"	O
load/store	O
"	O
model	O
of	O
the	O
PowerPC	B-Architecture
's	O
RISC	B-Architecture
design	O
,	O
the	O
vector	B-Operating_System
registers	O
,	O
like	O
the	O
scalar	O
registers	O
,	O
can	O
only	O
be	O
loaded	O
from	O
and	O
stored	O
to	O
memory	O
.	O
</s>
<s>
However	O
,	O
VMX/AltiVec	O
provides	O
a	O
much	O
more	O
complete	O
set	O
of	O
"	O
horizontal	O
"	O
operations	O
that	O
work	O
across	O
all	O
the	O
elements	O
of	O
a	O
vector	B-Operating_System
;	O
the	O
allowable	O
combinations	O
of	O
data	O
type	O
and	O
operations	O
are	O
much	O
more	O
complete	O
.	O
</s>
<s>
Thirty-two	O
128-bit	O
vector	B-Operating_System
registers	O
are	O
provided	O
,	O
compared	O
to	O
eight	O
for	O
SSE	B-General_Concept
and	O
SSE2	B-General_Concept
(	O
extended	O
to	O
16	O
in	O
x86-64	B-Device
)	O
,	O
and	O
most	O
VMX/AltiVec	O
instructions	O
take	O
three	O
register	O
operands	O
compared	O
to	O
only	O
two	O
register/register	O
or	O
register/memory	O
operands	O
on	O
IA-32	B-Device
.	O
</s>
<s>
VMX/AltiVec	O
is	O
also	O
unique	O
in	O
its	O
support	O
for	O
a	O
flexible	O
vector	B-Operating_System
permute	B-Algorithm
instruction	I-Algorithm
,	O
in	O
which	O
each	O
byte	O
of	O
a	O
resulting	O
vector	B-Operating_System
value	O
can	O
be	O
taken	O
from	O
any	O
byte	O
of	O
either	O
of	O
two	O
other	O
vectors	O
,	O
parametrized	O
by	O
yet	O
another	O
vector	B-Operating_System
.	O
</s>
<s>
Recent	O
versions	O
of	O
the	O
GNU	B-Application
Compiler	I-Application
Collection	I-Application
(	O
GCC	B-Application
)	O
,	O
IBM	B-Language
VisualAge	I-Language
compiler	O
and	O
other	O
compilers	O
provide	O
intrinsics	B-Application
to	O
access	O
VMX/AltiVec	O
instructions	O
directly	O
from	O
C	B-Language
and	O
C++	B-Language
programs	I-Language
.	O
</s>
<s>
As	O
of	O
version	O
4	O
,	O
the	O
GCC	B-Application
also	O
includes	O
auto-vectorization	B-General_Concept
capabilities	O
that	O
attempt	O
to	O
intelligently	O
create	O
VMX/Altivec	O
accelerated	O
binaries	O
without	O
the	O
need	O
for	O
the	O
programmer	O
to	O
use	O
intrinsics	B-Application
directly	O
.	O
</s>
<s>
The	O
"	O
vector	B-Operating_System
"	O
type	O
keyword	O
is	O
introduced	O
to	O
permit	O
the	O
declaration	O
of	O
native	O
vector	B-Operating_System
types	O
,	O
e.g.	O
,	O
"	O
vector	B-Operating_System
unsigned	O
char	O
foo	O
;	O
"	O
declares	O
a	O
128-bit	O
vector	B-Operating_System
variable	O
named	O
"	O
foo	O
"	O
containing	O
sixteen	O
8-bit	O
unsigned	O
chars	O
.	O
</s>
<s>
The	O
full	O
complement	O
of	O
arithmetic	O
and	O
binary	O
operators	O
is	O
defined	O
on	O
vector	B-Operating_System
types	O
so	O
that	O
the	O
normal	O
C	B-Language
expression	O
language	O
can	O
be	O
used	O
to	O
manipulate	O
vector	B-Operating_System
variables	O
.	O
</s>
<s>
There	O
are	O
also	O
overloaded	O
intrinsic	B-Application
functions	I-Application
such	O
as	O
"	O
vec_add	O
"	O
that	O
emit	O
the	O
appropriate	O
opcode	B-Language
based	O
on	O
the	O
type	O
of	O
the	O
elements	O
within	O
the	O
vector	B-Operating_System
,	O
and	O
very	O
strong	O
type	O
checking	O
is	O
enforced	O
.	O
</s>
<s>
In	O
contrast	O
,	O
the	O
Intel-defined	O
data	O
types	O
for	O
IA-32	B-Device
SIMD	B-Device
registers	O
declare	O
only	O
the	O
size	O
of	O
the	O
vector	B-Operating_System
register	O
(	O
128	O
or	O
64	O
bits	O
)	O
and	O
in	O
the	O
case	O
of	O
a	O
128-bit	O
register	O
,	O
whether	O
it	O
contains	O
integers	O
or	O
floating-point	B-Algorithm
values	O
.	O
</s>
<s>
The	O
Power	O
Vector	B-Operating_System
Media	O
Extension	O
(	O
VMX	O
)	O
was	O
developed	O
between	O
1996	O
and	O
1998	O
by	O
a	O
collaborative	O
project	O
between	O
Apple	O
,	O
IBM	O
,	O
and	O
Motorola	O
.	O
</s>
<s>
Apple	O
was	O
the	O
primary	O
customer	O
for	O
Power	O
Vector	B-Operating_System
Media	O
Extension	O
(	O
VMX	O
)	O
until	O
Apple	O
switched	O
to	O
Intel-made	O
,	O
x86-based	O
CPUs	O
on	O
June	O
6	O
,	O
2005	O
.	O
</s>
<s>
They	O
used	O
it	O
to	O
accelerate	O
multimedia	O
applications	O
such	O
as	O
QuickTime	B-Application
,	O
iTunes	B-Operating_System
and	O
key	O
parts	O
of	O
Apple	O
's	O
Mac	B-Operating_System
OS	I-Operating_System
X	I-Operating_System
including	O
in	O
the	O
Quartz	B-Operating_System
graphics	I-Operating_System
compositor	I-Operating_System
.	O
</s>
<s>
Other	O
companies	O
such	O
as	O
Adobe	O
used	O
AltiVec	B-General_Concept
to	O
optimize	O
their	O
image-processing	O
programs	O
such	O
as	O
Adobe	B-Operating_System
Photoshop	I-Operating_System
.	O
</s>
<s>
Motorola	O
was	O
the	O
first	O
to	O
supply	O
AltiVec	B-General_Concept
enabled	O
processors	O
starting	O
with	O
their	O
G4	B-General_Concept
line	O
.	O
</s>
<s>
AltiVec	B-General_Concept
was	O
also	O
used	O
in	O
some	O
embedded	O
systems	O
for	O
high-performance	O
digital	O
signal	O
processing	O
.	O
</s>
<s>
IBM	O
consistently	O
left	O
VMX	O
out	O
of	O
their	O
earlier	O
POWER	B-Device
microprocessors	I-Device
,	O
which	O
were	O
intended	O
for	O
server	O
applications	O
where	O
it	O
was	O
not	O
very	O
useful	O
.	O
</s>
<s>
The	O
POWER6	B-Device
microprocessor	O
,	O
introduced	O
in	O
2007	O
,	O
implements	O
AltiVec	B-General_Concept
.	O
</s>
<s>
The	O
last	O
desktop	O
microprocessor	O
from	O
IBM	O
,	O
the	O
PowerPC	B-General_Concept
970	I-General_Concept
(	O
dubbed	O
the	O
"	O
G5	B-General_Concept
"	O
by	O
Apple	O
)	O
also	O
implemented	O
AltiVec	B-General_Concept
with	O
hardware	O
similar	O
to	O
that	O
of	O
the	O
PowerPC	B-General_Concept
7400	I-General_Concept
.	O
</s>
<s>
AltiVec	B-General_Concept
is	O
a	O
brandname	O
trademarked	O
by	O
Freescale	O
(	O
previously	O
Motorola	O
)	O
for	O
the	O
standard	O
Category:Vector	O
part	O
of	O
the	O
Power	O
ISA	O
v.2.03	O
specification	O
.	O
</s>
<s>
This	O
category	O
is	O
also	O
known	O
as	O
VMX	O
(	O
used	O
by	O
IBM	O
)	O
,	O
and	O
"	O
Velocity	B-General_Concept
Engine	I-General_Concept
"	O
(	O
a	O
brand	O
name	O
previously	O
used	O
by	O
Apple	O
)	O
.	O
</s>
<s>
The	O
Cell	O
Broadband	O
Engine	O
,	O
used	O
in	O
(	O
amongst	O
other	O
things	O
)	O
the	O
PlayStation	B-Operating_System
3	I-Operating_System
,	O
also	O
supports	O
Power	O
Vector	B-Operating_System
Media	O
Extension	O
(	O
VMX	O
)	O
in	O
its	O
PPU	O
,	O
with	O
the	O
SPU	O
ISA	O
being	O
enhanced	O
but	O
architecturally	O
similar	O
.	O
</s>
<s>
Freescale	O
is	O
bringing	O
an	O
enhanced	O
version	O
of	O
AltiVec	B-General_Concept
to	O
e6500	B-General_Concept
based	O
QorIQ	B-General_Concept
processors	O
.	O
</s>
<s>
IBM	O
enhanced	O
VMX	O
for	O
use	O
in	O
Xenon	B-Device
(	O
Xbox	O
360	O
)	O
and	O
called	O
this	O
enhancement	O
VMX128	B-General_Concept
.	O
</s>
<s>
VMX128	B-General_Concept
is	O
not	O
entirely	O
compatible	O
with	O
VMX/Altivec	O
,	O
as	O
a	O
number	O
of	O
integer	O
operations	O
were	O
removed	O
to	O
make	O
space	O
for	O
the	O
larger	O
register	O
file	O
and	O
additional	O
application-specific	O
operations	O
.	O
</s>
<s>
Power	O
ISA	O
v2.06	O
introduced	O
VSX	O
vector-scalar	O
instructions	O
which	O
extend	O
SIMD	B-Device
processing	O
for	O
the	O
Power	O
ISA	O
to	O
support	O
up	O
to	O
64	O
registers	O
,	O
with	O
support	O
for	O
regular	O
floating	B-Algorithm
point	I-Algorithm
,	O
decimal	O
floating	B-Algorithm
point	I-Algorithm
and	O
vector	B-Operating_System
execution	O
.	O
</s>
<s>
POWER7	B-Device
is	O
the	O
first	O
Power	O
ISA	O
processor	O
to	O
implement	O
Power	O
ISA	O
v2.06	O
.	O
</s>
<s>
New	O
instructions	O
are	O
introduced	O
by	O
IBM	O
under	O
the	O
Vector	B-Operating_System
Media	O
Extension	O
category	O
for	O
integer	O
operations	O
as	O
part	O
of	O
the	O
VSX	O
extension	O
in	O
Power	O
ISA	O
2.07	O
.	O
</s>
<s>
New	O
integer	O
vector	B-Operating_System
instructions	O
were	O
introduced	O
by	O
IBM	O
following	O
the	O
VMX	O
encodings	O
as	O
part	O
of	O
the	O
VSX	O
extension	O
in	O
Power	O
ISA	O
v3.0	O
.	O
</s>
<s>
Shall	O
be	O
introduced	O
with	O
POWER9	B-Device
processors	O
.	O
</s>
<s>
In	O
C++	B-Language
,	O
the	O
standard	O
way	O
of	O
accessing	O
AltiVec	B-General_Concept
support	O
is	O
mutually	O
exclusive	O
with	O
the	O
use	O
of	O
the	O
Standard	O
Template	O
Library	O
vectorxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1	O
class	O
template	O
due	O
to	O
the	O
treatment	O
of	O
"	O
vector	B-Operating_System
"	O
as	O
a	O
reserved	O
word	O
when	O
the	O
compiler	O
does	O
not	O
implement	O
the	O
context-sensitive	O
keyword	O
version	O
of	O
vector	B-Operating_System
.	O
</s>
<s>
However	O
,	O
it	O
may	O
be	O
possible	O
to	O
combine	O
them	O
using	O
compiler-specific	O
workarounds	O
;	O
for	O
instance	O
,	O
in	O
GCC	B-Application
one	O
may	O
do	O
#undef	O
vector	B-Operating_System
to	O
remove	O
the	O
vector	B-Operating_System
keyword	O
,	O
and	O
then	O
use	O
the	O
GCC-specific	O
__vector	O
keyword	O
in	O
its	O
place	O
.	O
</s>
<s>
AltiVec	B-General_Concept
prior	O
to	O
Power	O
ISA	O
2.06	O
with	O
VSX	O
lacks	O
loading	O
from	O
memory	O
using	O
a	O
type	O
's	O
natural	O
alignment	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
code	O
below	O
requires	O
special	O
handling	O
for	O
Power6	B-Device
and	O
below	O
when	O
the	O
effective	O
address	O
is	O
not	O
16-byte	O
aligned	O
.	O
</s>
<s>
AltiVec	B-General_Concept
prior	O
to	O
Power	O
ISA	O
2.06	O
with	O
VMX	O
lacks	O
64-bit	O
integer	O
support	O
.	O
</s>
<s>
For	O
example	O
,	O
below	O
are	O
examples	O
of	O
64-bit	O
add	O
and	O
subtract	O
in	O
C	B-Language
using	O
a	O
vector	B-Operating_System
with	O
four	O
32-bit	O
words	O
on	O
a	O
big-endian	O
machine	O
.	O
</s>
<s>
Power	O
ISA	O
2.07	O
used	O
in	O
Power8	B-Device
finally	O
provided	O
the	O
64-bit	O
double	O
words	O
.	O
</s>
<s>
A	O
developer	O
working	O
with	O
Power8	B-Device
needs	O
only	O
to	O
perform	O
the	O
following	O
.	O
</s>
<s>
Cell	B-General_Concept
B.E.	I-General_Concept
</s>
<s>
The	O
following	O
software	O
applications	O
are	O
known	O
to	O
leverage	O
AltiVec	B-General_Concept
or	O
VMX	O
hardware	O
acceleration	O
.	O
</s>
<s>
Helios	O
has	O
a	O
native	O
POWER9	B-Device
/	O
POWER10	B-Operating_System
port	O
with	O
support	O
for	O
VMX	O
.	O
</s>
