<s>
Single	B-Device
instruction	I-Device
,	I-Device
multiple	I-Device
data	I-Device
(	O
SIMD	B-Device
)	O
is	O
a	O
type	O
of	O
parallel	B-Operating_System
processing	I-Operating_System
in	O
Flynn	B-Operating_System
's	I-Operating_System
taxonomy	I-Operating_System
.	O
</s>
<s>
SIMD	B-Device
can	O
be	O
internal	O
(	O
part	O
of	O
the	O
hardware	O
design	O
)	O
and	O
it	O
can	O
be	O
directly	O
accessible	O
through	O
an	O
instruction	B-General_Concept
set	I-General_Concept
architecture	I-General_Concept
(	O
ISA	O
)	O
,	O
but	O
it	O
should	O
not	O
be	O
confused	O
with	O
an	O
ISA	O
.	O
</s>
<s>
SIMD	B-Device
describes	O
computers	O
with	O
multiple	B-Operating_System
processing	I-Operating_System
elements	I-Operating_System
that	O
perform	O
the	O
same	O
operation	O
on	O
multiple	O
data	O
points	O
simultaneously	O
.	O
</s>
<s>
Such	O
machines	O
exploit	O
data	B-Operating_System
level	I-Operating_System
parallelism	I-Operating_System
,	O
but	O
not	O
concurrency	B-Architecture
:	O
there	O
are	O
simultaneous	O
(	O
parallel	O
)	O
computations	O
,	O
but	O
each	O
unit	O
performs	O
the	O
exact	O
same	O
instruction	O
at	O
any	O
given	O
moment	O
(	O
just	O
with	O
different	O
data	O
)	O
.	O
</s>
<s>
SIMD	B-Device
is	O
particularly	O
applicable	O
to	O
common	O
tasks	O
such	O
as	O
adjusting	O
the	O
contrast	O
in	O
a	O
digital	B-Algorithm
image	I-Algorithm
or	O
adjusting	O
the	O
volume	O
of	O
digital	O
audio	O
.	O
</s>
<s>
Most	O
modern	O
CPU	B-General_Concept
designs	O
include	O
SIMD	B-Device
instructions	O
to	O
improve	O
the	O
performance	O
of	O
multimedia	O
use	O
.	O
</s>
<s>
SIMD	B-Device
has	O
three	O
different	O
subcategories	O
in	O
Flynn	O
's	O
1972	O
Taxonomy	O
,	O
one	O
of	O
which	O
is	O
SIMT	B-General_Concept
.	O
</s>
<s>
SIMT	B-General_Concept
should	O
not	O
be	O
confused	O
with	O
software	B-Operating_System
threads	I-Operating_System
or	O
hardware	B-General_Concept
threads	I-General_Concept
,	O
both	O
of	O
which	O
are	O
task	O
time-sharing	O
(	O
time-slicing	O
)	O
.	O
</s>
<s>
SIMT	B-General_Concept
is	O
true	O
simultaneous	O
parallel	O
hardware-level	O
execution	O
.	O
</s>
<s>
The	O
first	O
use	O
of	O
SIMD	B-Device
instructions	O
was	O
in	O
the	O
ILLIAC	B-Device
IV	I-Device
,	O
which	O
was	O
completed	O
in	O
1966	O
.	O
</s>
<s>
SIMD	B-Device
was	O
the	O
basis	O
for	O
vector	B-Operating_System
supercomputers	I-Operating_System
of	O
the	O
early	O
1970s	O
such	O
as	O
the	O
CDC	B-Device
Star-100	I-Device
and	O
the	O
Texas	B-Device
Instruments	I-Device
ASC	I-Device
,	O
which	O
could	O
operate	O
on	O
a	O
"	O
vector	O
"	O
of	O
data	O
with	O
a	O
single	O
instruction	O
.	O
</s>
<s>
Vector	B-Operating_System
processing	I-Operating_System
was	O
especially	O
popularized	O
by	O
Cray	O
in	O
the	O
1970s	O
and	O
1980s	O
.	O
</s>
<s>
Vector	B-Operating_System
processing	I-Operating_System
architectures	O
are	O
now	O
considered	O
separate	O
from	O
SIMD	B-Device
computers	O
:	O
Duncan	B-Architecture
's	I-Architecture
Taxonomy	I-Architecture
includes	O
them	O
where	O
Flynn	B-Operating_System
's	I-Operating_System
Taxonomy	I-Operating_System
does	O
not	O
,	O
due	O
to	O
Flynn	O
's	O
work	O
(	O
1966	O
,	O
1972	O
)	O
pre-dating	O
the	O
Cray-1	B-Device
(	O
1977	O
)	O
.	O
</s>
<s>
The	O
first	O
era	O
of	O
modern	O
SIMD	B-Device
computers	O
was	O
characterized	O
by	O
massively	O
parallel	O
processing-style	O
supercomputers	B-Architecture
such	O
as	O
the	O
Thinking	O
Machines	O
CM-1	B-Device
and	I-Device
CM-2	I-Device
.	O
</s>
<s>
Supercomputing	B-Architecture
moved	O
away	O
from	O
the	O
SIMD	B-Device
approach	O
when	O
inexpensive	O
scalar	O
MIMD	B-Operating_System
approaches	O
based	O
on	O
commodity	O
processors	O
such	O
as	O
the	O
Intel	B-General_Concept
i860	I-General_Concept
XP	I-General_Concept
became	O
more	O
powerful	O
,	O
and	O
interest	O
in	O
SIMD	B-Device
waned	O
.	O
</s>
<s>
The	O
current	O
era	O
of	O
SIMD	B-Device
processors	O
grew	O
out	O
of	O
the	O
desktop-computer	O
market	O
rather	O
than	O
the	O
supercomputer	B-Architecture
market	O
.	O
</s>
<s>
As	O
desktop	O
processors	O
became	O
powerful	O
enough	O
to	O
support	O
real-time	O
gaming	O
and	O
audio/video	O
processing	O
during	O
the	O
1990s	O
,	O
demand	O
grew	O
for	O
this	O
particular	O
type	O
of	O
computing	O
power	B-Device
,	O
and	O
microprocessor	O
vendors	O
turned	O
to	O
SIMD	B-Device
to	O
meet	O
the	O
demand	O
.	O
</s>
<s>
Hewlett-Packard	O
introduced	O
MAX	B-General_Concept
instructions	O
into	O
PA-RISC	B-Device
1.1	O
desktops	O
in	O
1994	O
to	O
accelerate	O
MPEG	O
decoding	O
.	O
</s>
<s>
Sun	O
Microsystems	O
introduced	O
SIMD	B-Device
integer	O
instructions	O
in	O
its	O
"	O
VIS	B-General_Concept
"	O
instruction	B-General_Concept
set	I-General_Concept
extensions	O
in	O
1995	O
,	O
in	O
its	O
UltraSPARC	B-General_Concept
I	I-General_Concept
microprocessor	O
.	O
</s>
<s>
MIPS	B-Device
followed	O
suit	O
with	O
their	O
similar	O
MDMX	B-General_Concept
system	O
.	O
</s>
<s>
The	O
first	O
widely	O
deployed	O
desktop	O
SIMD	B-Device
was	O
with	O
Intel	O
's	O
MMX	B-Architecture
extensions	O
to	O
the	O
x86	B-Operating_System
architecture	I-Operating_System
in	O
1996	O
.	O
</s>
<s>
This	O
sparked	O
the	O
introduction	O
of	O
the	O
much	O
more	O
powerful	O
AltiVec	B-General_Concept
system	O
in	O
the	O
Motorola	O
PowerPC	B-Architecture
and	O
IBM	O
's	O
POWER	B-Device
systems	O
.	O
</s>
<s>
Intel	O
responded	O
in	O
1999	O
by	O
introducing	O
the	O
all-new	O
SSE	B-General_Concept
system	O
.	O
</s>
<s>
Since	O
then	O
,	O
there	O
have	O
been	O
several	O
extensions	O
to	O
the	O
SIMD	B-Device
instruction	B-General_Concept
sets	I-General_Concept
for	O
both	O
architectures	O
.	O
</s>
<s>
Advanced	B-General_Concept
vector	I-General_Concept
extensions	I-General_Concept
AVX	O
,	O
AVX2	O
and	O
AVX-512	B-General_Concept
are	O
developed	O
by	O
Intel	O
.	O
</s>
<s>
When	O
new	O
SIMD	B-Device
architectures	O
need	O
to	O
be	O
distinguished	O
from	O
older	O
ones	O
,	O
the	O
newer	O
architectures	O
are	O
then	O
considered	O
"	O
short-vector	O
"	O
architectures	O
,	O
as	O
earlier	O
SIMD	B-Device
and	O
vector	B-Operating_System
supercomputers	I-Operating_System
had	O
vector	O
lengths	O
from	O
64	O
to	O
64,000	O
.	O
</s>
<s>
A	O
modern	O
supercomputer	B-Architecture
is	O
almost	O
always	O
a	O
cluster	O
of	O
MIMD	B-Operating_System
computers	O
,	O
each	O
of	O
which	O
implements	O
(	O
short-vector	O
)	O
SIMD	B-Device
instructions	O
.	O
</s>
<s>
An	O
application	O
that	O
may	O
take	O
advantage	O
of	O
SIMD	B-Device
is	O
one	O
where	O
the	O
same	O
value	O
is	O
being	O
added	O
to	O
(	O
or	O
subtracted	O
from	O
)	O
a	O
large	O
number	O
of	O
data	O
points	O
,	O
a	O
common	O
operation	O
in	O
many	O
multimedia	O
applications	O
.	O
</s>
<s>
Each	O
pixel	B-Algorithm
of	O
an	O
image	O
consists	O
of	O
three	O
values	O
for	O
the	O
brightness	O
of	O
the	O
red	O
(	O
R	O
)	O
,	O
green	O
(	O
G	O
)	O
and	O
blue	O
(	O
B	O
)	O
portions	O
of	O
the	O
color	O
.	O
</s>
<s>
With	O
a	O
SIMD	B-Device
processor	O
there	O
are	O
two	O
improvements	O
to	O
this	O
process	O
.	O
</s>
<s>
Instead	O
of	O
a	O
series	O
of	O
instructions	O
saying	O
"	O
retrieve	O
this	O
pixel	B-Algorithm
,	O
now	O
retrieve	O
the	O
next	O
pixel	B-Algorithm
"	O
,	O
a	O
SIMD	B-Device
processor	O
will	O
have	O
a	O
single	O
instruction	O
that	O
effectively	O
says	O
"	O
retrieve	O
n	O
pixels	B-Algorithm
"	O
(	O
where	O
n	O
is	O
a	O
number	O
that	O
varies	O
from	O
design	O
to	O
design	O
)	O
.	O
</s>
<s>
For	O
a	O
variety	O
of	O
reasons	O
,	O
this	O
can	O
take	O
much	O
less	O
time	O
than	O
retrieving	O
each	O
pixel	B-Algorithm
individually	O
,	O
as	O
with	O
a	O
traditional	O
CPU	B-General_Concept
design	O
.	O
</s>
<s>
In	O
other	O
words	O
,	O
if	O
the	O
SIMD	B-Device
system	O
works	O
by	O
loading	O
up	O
eight	O
data	O
points	O
at	O
once	O
,	O
the	O
add	O
operation	O
being	O
applied	O
to	O
the	O
data	O
will	O
happen	O
to	O
all	O
eight	O
values	O
at	O
the	O
same	O
time	O
.	O
</s>
<s>
This	O
parallelism	B-Operating_System
is	O
separate	O
from	O
the	O
parallelism	B-Operating_System
provided	O
by	O
a	O
superscalar	B-General_Concept
processor	I-General_Concept
;	O
the	O
eight	O
values	O
are	O
processed	O
in	O
parallel	O
even	O
on	O
a	O
non-superscalar	O
processor	O
,	O
and	O
a	O
superscalar	B-General_Concept
processor	I-General_Concept
may	O
be	O
able	O
to	O
perform	O
multiple	O
SIMD	B-Device
operations	O
in	O
parallel	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
flow-control-heavy	O
task	O
like	O
code	O
parsing	B-Language
may	O
not	O
easily	O
benefit	O
from	O
SIMD	B-Device
;	O
however	O
,	O
it	O
is	O
theoretically	O
possible	O
to	O
vectorize	O
comparisons	O
and	O
"	O
batch	O
flow	O
"	O
to	O
target	O
maximal	O
cache	B-General_Concept
optimality	O
,	O
though	O
this	O
technique	O
will	O
require	O
more	O
intermediate	O
state	O
.	O
</s>
<s>
Note	O
:	O
Batch-pipeline	O
systems	O
(	O
example	O
:	O
GPUs	B-Architecture
or	O
software	O
rasterization	O
pipelines	O
)	O
are	O
most	O
advantageous	O
for	O
cache	B-General_Concept
control	O
when	O
implemented	O
with	O
SIMD	B-Device
intrinsics	O
,	O
but	O
they	O
are	O
not	O
exclusive	O
to	O
SIMD	B-Device
features	O
.	O
</s>
<s>
Large	O
register	O
files	O
which	O
increases	O
power	B-Device
consumption	O
and	O
required	O
chip	O
area	O
.	O
</s>
<s>
Currently	O
,	O
implementing	O
an	O
algorithm	O
with	O
SIMD	B-Device
instructions	O
usually	O
requires	O
human	O
labor	O
;	O
most	O
compilers	O
do	O
n't	O
generate	O
SIMD	B-Device
instructions	O
from	O
a	O
typical	O
C	B-Language
program	I-Language
,	O
for	O
instance	O
.	O
</s>
<s>
Automatic	B-General_Concept
vectorization	I-General_Concept
in	O
compilers	O
is	O
an	O
active	O
area	O
of	O
computer	O
science	O
research	O
.	O
</s>
<s>
(	O
Compare	O
vector	B-Operating_System
processing	I-Operating_System
.	O
)	O
</s>
<s>
Programming	O
with	O
particular	O
SIMD	B-Device
instruction	B-General_Concept
sets	I-General_Concept
can	O
involve	O
numerous	O
low-level	O
challenges	O
.	O
</s>
<s>
SIMD	B-Device
may	O
have	O
restrictions	O
on	O
data	B-Application
alignment	I-Application
;	O
programmers	O
familiar	O
with	O
one	O
particular	O
architecture	O
may	O
not	O
expect	O
this	O
.	O
</s>
<s>
Gathering	O
data	O
into	O
SIMD	B-Device
registers	B-General_Concept
and	O
scattering	O
it	O
to	O
the	O
correct	O
destination	O
locations	O
is	O
tricky	O
(	O
sometimes	O
requiring	O
permute	B-Algorithm
operations	I-Algorithm
)	O
and	O
can	O
be	O
inefficient	O
.	O
</s>
<s>
Specific	O
instructions	O
like	O
rotations	O
or	O
three-operand	O
addition	O
are	O
not	O
available	O
in	O
some	O
SIMD	B-Device
instruction	B-General_Concept
sets	I-General_Concept
.	O
</s>
<s>
Instruction	B-General_Concept
sets	I-General_Concept
are	O
architecture-specific	O
:	O
some	O
processors	O
lack	O
SIMD	B-Device
instructions	O
entirely	O
,	O
so	O
programmers	O
must	O
provide	O
non-vectorized	O
implementations	O
(	O
or	O
different	O
vectorized	O
implementations	O
)	O
for	O
them	O
.	O
</s>
<s>
64	O
,	O
128	O
,	O
256	O
and	O
512	O
bits	O
)	O
and	O
instruction	B-General_Concept
sets	I-General_Concept
,	O
meaning	O
that	O
programmers	O
must	O
provide	O
multiple	O
implementations	O
of	O
vectorized	O
code	O
to	O
operate	O
optimally	O
on	O
any	O
given	O
CPU	B-General_Concept
.	O
</s>
<s>
In	O
addition	O
,	O
the	O
possible	O
set	O
of	O
SIMD	B-Device
instructions	O
grows	O
with	O
each	O
new	O
register	O
size	O
.	O
</s>
<s>
The	O
early	O
MMX	B-Architecture
instruction	B-General_Concept
set	I-General_Concept
shared	O
a	O
register	O
file	O
with	O
the	O
floating-point	O
stack	O
,	O
which	O
caused	O
inefficiencies	O
when	O
mixing	O
floating-point	O
and	O
MMX	B-Architecture
code	O
.	O
</s>
<s>
However	O
,	O
SSE2	B-General_Concept
corrects	O
this	O
.	O
</s>
<s>
To	O
remedy	O
problems	O
1	O
and	O
5	O
,	O
RISC-V	B-Device
'	O
s	O
vector	O
extension	O
uses	O
an	O
alternative	O
approach	O
:	O
instead	O
of	O
exposing	O
the	O
sub-register-level	O
details	O
to	O
the	O
programmer	O
,	O
the	O
instruction	B-General_Concept
set	I-General_Concept
abstracts	O
them	O
out	O
as	O
a	O
few	O
"	O
vector	O
registers	B-General_Concept
"	O
that	O
use	O
the	O
same	O
interfaces	O
across	O
all	O
CPUs	O
with	O
this	O
instruction	B-General_Concept
set	I-General_Concept
.	O
</s>
<s>
LLVM	B-Application
calls	O
this	O
vector	O
type	O
""	O
.	O
</s>
<s>
ARM	O
's	O
Scalable	O
Vector	O
Extension	O
takes	O
another	O
approach	O
,	O
known	O
in	O
Flynn	B-Operating_System
's	I-Operating_System
Taxonomy	I-Operating_System
as	O
"	O
Associative	O
Processing	O
"	O
,	O
more	O
commonly	O
known	O
today	O
as	O
"	O
Predicated	O
"	O
(	O
masked	O
)	O
SIMD	B-Device
.	O
</s>
<s>
This	O
approach	O
is	O
not	O
as	O
compact	O
as	O
Vector	B-Operating_System
processing	I-Operating_System
but	O
is	O
still	O
far	O
better	O
than	O
non-predicated	O
SIMD	B-Device
.	O
</s>
<s>
Detailed	O
comparative	O
examples	O
are	O
given	O
in	O
the	O
Vector	B-Operating_System
processing	I-Operating_System
page	O
.	O
</s>
<s>
+	O
Examples	O
of	O
SIMD	B-Device
supercomputers	B-Architecture
(	O
not	O
including	O
vector	B-Operating_System
processors	I-Operating_System
)	O
Year	O
Example	O
1974	O
ILLIAC	B-Device
IV	I-Device
1974	O
ICL	B-Device
Distributed	I-Device
Array	I-Device
Processor	I-Device
(	O
DAP	O
)	O
1976	O
Burroughs	O
Scientific	O
Processor	O
1981	O
Geometric-Arithmetic	B-General_Concept
Parallel	I-General_Concept
Processor	I-General_Concept
from	O
Martin	O
Marietta	O
(	O
continued	O
at	O
Lockheed	O
Martin	O
,	O
then	O
at	O
Teranex	O
and	O
Silicon	O
Optix	O
)	O
1983-1991	O
Massively	B-Device
Parallel	I-Device
Processor	I-Device
(	O
MPP	O
)	O
,	O
from	O
NASA/Goddard	O
Space	O
Flight	O
Center	O
1985	O
Connection	B-Device
Machine	I-Device
,	O
models	O
1	O
and	O
2	O
(	O
CM-1	B-Device
and	I-Device
CM-2	I-Device
)	O
,	O
from	O
Thinking	O
Machines	O
Corporation	O
1987-1996	O
MasPar	B-Device
MP-1	O
and	O
MP-2	O
1991	O
Zephyr	O
DC	O
from	O
Wavetracer	O
2001	O
Xplor	O
from	O
Pyxsys	O
,	O
Inc	O
.	O
</s>
<s>
Small-scale	O
(	O
64	O
or	O
128	O
bits	O
)	O
SIMD	B-Device
became	O
popular	O
on	O
general-purpose	O
CPUs	O
in	O
the	O
early	O
1990s	O
and	O
continued	O
through	O
1997	O
and	O
later	O
with	O
Motion	B-Device
Video	I-Device
Instructions	I-Device
(	O
MVI	O
)	O
for	O
Alpha	B-Device
.	O
</s>
<s>
SIMD	B-Device
instructions	O
can	O
be	O
found	O
,	O
to	O
one	O
degree	O
or	O
another	O
,	O
on	O
most	O
CPUs	O
,	O
including	O
IBM	O
's	O
AltiVec	B-General_Concept
and	O
SPE	O
for	O
PowerPC	B-Architecture
,	O
HP	O
's	O
PA-RISC	B-Device
Multimedia	B-General_Concept
Acceleration	I-General_Concept
eXtensions	I-General_Concept
(	O
MAX	B-General_Concept
)	O
,	O
Intel	O
's	O
MMX	B-Architecture
and	I-Architecture
iwMMXt	I-Architecture
,	O
SSE	B-General_Concept
,	O
SSE2	B-General_Concept
,	O
SSE3	B-General_Concept
SSSE3	B-General_Concept
and	O
SSE4.x	B-General_Concept
,	O
AMD	O
's	O
3DNow	O
!,	O
ARC	B-Application
's	O
ARC	B-Application
Video	O
subsystem	O
,	O
SPARC	B-Architecture
's	O
VIS	B-General_Concept
and	O
VIS2	O
,	O
Sun	O
's	O
MAJC	B-General_Concept
,	O
ARM	O
's	O
Neon	O
technology	O
,	O
MIPS	B-Device
 '	O
MDMX	B-General_Concept
(	O
MaDMaX	O
)	O
and	O
MIPS-3D	B-General_Concept
.	O
</s>
<s>
The	O
IBM	O
,	O
Sony	O
,	O
Toshiba	O
co-developed	O
Cell	B-General_Concept
Processor	I-General_Concept
's	O
SPU	O
's	O
instruction	B-General_Concept
set	I-General_Concept
is	O
heavily	O
SIMD	B-Device
based	O
.	O
</s>
<s>
Philips	O
,	O
now	O
NXP	O
,	O
developed	O
several	O
SIMD	B-Device
processors	O
named	O
Xetal	B-General_Concept
.	O
</s>
<s>
The	O
Xetal	B-General_Concept
has	O
320	O
16-bit	O
processor	O
elements	O
especially	O
designed	O
for	O
vision	O
tasks	O
.	O
</s>
<s>
Modern	O
graphics	B-Architecture
processing	I-Architecture
units	I-Architecture
(	O
GPUs	B-Architecture
)	O
are	O
often	O
wide	O
SIMD	B-Device
implementations	O
,	O
capable	O
of	O
branches	O
,	O
loads	O
,	O
and	O
stores	O
on	O
128	O
or	O
256	O
bits	O
at	O
a	O
time	O
.	O
</s>
<s>
Intel	O
's	O
AVX-512	B-General_Concept
SIMD	B-Device
instructions	O
process	O
512	O
bits	O
of	O
data	O
at	O
once	O
.	O
</s>
<s>
SIMD	B-Device
instructions	O
are	O
widely	O
used	O
to	O
process	O
3D	O
graphics	O
,	O
although	O
modern	O
graphics	B-Device
cards	I-Device
with	O
embedded	O
SIMD	B-Device
have	O
largely	O
taken	O
over	O
this	O
task	O
from	O
the	O
CPU	B-General_Concept
.	O
</s>
<s>
The	O
trend	O
of	O
general-purpose	O
computing	O
on	O
GPUs	B-Architecture
(	O
GPGPU	B-Architecture
)	O
may	O
lead	O
to	O
wider	O
use	O
of	O
SIMD	B-Device
in	O
the	O
future	O
.	O
</s>
<s>
Adoption	O
of	O
SIMD	B-Device
systems	O
in	O
personal	B-Device
computer	I-Device
software	O
was	O
at	O
first	O
slow	O
,	O
due	O
to	O
a	O
number	O
of	O
problems	O
.	O
</s>
<s>
One	O
was	O
that	O
many	O
of	O
the	O
early	O
SIMD	B-Device
instruction	B-General_Concept
sets	I-General_Concept
tended	O
to	O
slow	O
overall	O
performance	O
of	O
the	O
system	O
due	O
to	O
the	O
re-use	O
of	O
existing	O
floating	O
point	O
registers	B-General_Concept
.	O
</s>
<s>
Other	O
systems	O
,	O
like	O
MMX	B-Architecture
and	O
3DNow	O
!,	O
offered	O
support	O
for	O
data	O
types	O
that	O
were	O
not	O
interesting	O
to	O
a	O
wide	O
audience	O
and	O
had	O
expensive	O
context	O
switching	O
instructions	O
to	O
switch	O
between	O
using	O
the	O
FPU	B-General_Concept
and	O
MMX	B-Architecture
registers	B-General_Concept
.	O
</s>
<s>
Compilers	O
also	O
often	O
lacked	O
support	O
,	O
requiring	O
programmers	O
to	O
resort	O
to	O
assembly	B-Language
language	I-Language
coding	O
.	O
</s>
<s>
SIMD	B-Device
on	O
x86	B-Operating_System
had	O
a	O
slow	O
start	O
.	O
</s>
<s>
The	O
introduction	O
of	O
3DNow	B-General_Concept
!	I-General_Concept
</s>
<s>
by	O
AMD	O
and	O
SSE	B-General_Concept
by	O
Intel	O
confused	O
matters	O
somewhat	O
,	O
but	O
today	O
the	O
system	O
seems	O
to	O
have	O
settled	O
down	O
(	O
after	O
AMD	O
adopted	O
SSE	B-General_Concept
)	O
and	O
newer	O
compilers	O
should	O
result	O
in	O
more	O
SIMD-enabled	O
software	O
.	O
</s>
<s>
Intel	O
and	O
AMD	O
now	O
both	O
provide	O
optimized	O
math	O
libraries	O
that	O
use	O
SIMD	B-Device
instructions	O
,	O
and	O
open	O
source	O
alternatives	O
like	O
libSIMD	O
,	O
SIMDx86	O
and	O
SLEEF	O
have	O
started	O
to	O
appear	O
(	O
see	O
also	O
libm	O
)	O
.	O
</s>
<s>
Apple	O
Computer	O
had	O
somewhat	O
more	O
success	O
,	O
even	O
though	O
they	O
entered	O
the	O
SIMD	B-Device
market	O
later	O
than	O
the	O
rest	O
.	O
</s>
<s>
AltiVec	B-General_Concept
offered	O
a	O
rich	O
system	O
and	O
can	O
be	O
programmed	O
using	O
increasingly	O
sophisticated	O
compilers	O
from	O
Motorola	O
,	O
IBM	O
and	O
GNU	B-Operating_System
,	O
therefore	O
assembly	B-Language
language	I-Language
programming	O
is	O
rarely	O
needed	O
.	O
</s>
<s>
Additionally	O
,	O
many	O
of	O
the	O
systems	O
that	O
would	O
benefit	O
from	O
SIMD	B-Device
were	O
supplied	O
by	O
Apple	O
itself	O
,	O
for	O
example	O
iTunes	B-Operating_System
and	O
QuickTime	B-Application
.	O
</s>
<s>
However	O
,	O
in	O
2006	O
,	O
Apple	O
computers	O
moved	O
to	O
Intel	B-Operating_System
x86	I-Operating_System
processors	O
.	O
</s>
<s>
Apple	O
's	O
APIs	B-Application
and	O
development	B-Application
tools	I-Application
(	O
XCode	B-Operating_System
)	O
were	O
modified	O
to	O
support	O
SSE2	B-General_Concept
and	O
SSE3	B-General_Concept
as	O
well	O
as	O
AltiVec	B-General_Concept
.	O
</s>
<s>
Apple	O
was	O
the	O
dominant	O
purchaser	O
of	O
PowerPC	B-Architecture
chips	I-Architecture
from	O
IBM	O
and	O
Freescale	O
Semiconductor	O
and	O
even	O
though	O
they	O
abandoned	O
the	O
platform	O
,	O
further	O
development	O
of	O
AltiVec	B-General_Concept
is	O
continued	O
in	O
several	O
PowerPC	B-Architecture
and	O
Power	B-Architecture
ISA	I-Architecture
designs	O
from	O
Freescale	O
and	O
IBM	O
.	O
</s>
<s>
SIMD	B-General_Concept
within	I-General_Concept
a	I-General_Concept
register	I-General_Concept
,	O
or	O
SWAR	B-General_Concept
,	O
is	O
a	O
range	O
of	O
techniques	O
and	O
tricks	O
used	O
for	O
performing	O
SIMD	B-Device
in	O
general-purpose	O
registers	B-General_Concept
on	O
hardware	O
that	O
does	O
n't	O
provide	O
any	O
direct	O
support	O
for	O
SIMD	B-Device
instructions	O
.	O
</s>
<s>
This	O
can	O
be	O
used	O
to	O
exploit	O
parallelism	B-Operating_System
in	O
certain	O
algorithms	O
even	O
on	O
hardware	O
that	O
does	O
not	O
support	O
SIMD	B-Device
directly	O
.	O
</s>
<s>
It	O
is	O
common	O
for	O
publishers	O
of	O
the	O
SIMD	B-Device
instruction	B-General_Concept
sets	I-General_Concept
to	O
make	O
their	O
own	O
C/C	O
++	O
language	O
extensions	O
with	O
intrinsic	B-Application
functions	I-Application
or	O
special	O
datatypes	O
(	O
with	O
operator	O
overloading	O
)	O
guaranteeing	O
the	O
generation	O
of	O
vector	O
code	O
.	O
</s>
<s>
Intel	O
,	O
AltiVec	B-General_Concept
,	O
and	O
ARM	O
NEON	O
provide	O
extensions	O
widely	O
adopted	O
by	O
the	O
compilers	O
targeting	O
their	O
CPUs	O
.	O
</s>
<s>
The	O
GNU	B-Application
C	I-Application
Compiler	I-Application
takes	O
the	O
extensions	O
a	O
step	O
further	O
by	O
abstracting	O
them	O
into	O
a	O
universal	O
interface	O
that	O
can	O
be	O
used	O
on	O
any	O
platform	O
by	O
providing	O
a	O
way	O
of	O
defining	O
SIMD	B-Device
datatypes	O
.	O
</s>
<s>
The	O
LLVM	B-Application
Clang	B-Application
compiler	O
also	O
implements	O
the	O
feature	O
,	O
with	O
an	O
analogous	O
interface	O
defined	O
in	O
the	O
IR	O
.	O
</s>
<s>
Rust	B-Application
's	O
packed_simd	O
crate	O
uses	O
this	O
interface	O
,	O
and	O
so	O
does	O
Swift	B-Application
2.0	O
+	O
.	O
</s>
<s>
C++	O
has	O
an	O
experimental	O
interface	O
that	O
works	O
similarly	O
to	O
the	O
GCC	B-Application
extension	O
.	O
</s>
<s>
LLVM	B-Application
's	O
libcxx	O
seems	O
to	O
implement	O
it	O
.	O
</s>
<s>
For	O
GCC	B-Application
and	O
libstdc++	O
,	O
a	O
wrapper	O
library	O
that	O
builds	O
on	O
top	O
of	O
the	O
GCC	B-Application
extension	O
is	O
available	O
.	O
</s>
<s>
Microsoft	O
added	O
SIMD	B-Device
to	O
.NET	B-Application
in	O
RyuJIT	O
.	O
</s>
<s>
The	O
package	O
,	O
available	O
on	O
NuGet	O
,	O
implement	O
SIMD	B-Device
datatypes	O
.	O
</s>
<s>
Java	O
also	O
has	O
a	O
new	O
proposed	O
API	B-Application
for	O
SIMD	B-Device
instructions	O
available	O
in	O
OpenJDK	B-Language
17	O
in	O
an	O
incubator	O
module	O
.	O
</s>
<s>
Instead	O
of	O
providing	O
an	O
SIMD	B-Device
datatype	O
,	O
compilers	O
can	O
also	O
be	O
hinted	O
to	O
auto-vectorize	O
some	O
loops	O
,	O
potentially	O
taking	O
some	O
assertions	O
about	O
the	O
lack	O
of	O
data	O
dependency	O
.	O
</s>
<s>
This	O
is	O
not	O
as	O
flexible	O
as	O
manipulating	O
SIMD	B-Device
variables	O
directly	O
,	O
but	O
is	O
easier	O
to	O
use	O
.	O
</s>
<s>
OpenMP	B-Application
4.0	O
+	O
has	O
a	O
hint	O
.	O
</s>
<s>
This	O
OpenMP	B-Application
interface	O
has	O
replaced	O
a	O
wide	O
set	O
of	O
nonstandard	O
extensions	O
,	O
including	O
Cilk	B-Language
's	O
.	O
,	O
GCC	B-Application
's	O
,	O
and	O
many	O
more	O
.	O
</s>
<s>
Consumer	O
software	O
is	O
typically	O
expected	O
to	O
work	O
on	O
a	O
range	O
of	O
CPUs	O
covering	O
multiple	O
generations	O
,	O
which	O
could	O
limit	O
the	O
programmer	O
's	O
ability	O
to	O
use	O
new	O
SIMD	B-Device
instructions	O
to	O
improve	O
the	O
computational	O
performance	O
of	O
a	O
program	O
.	O
</s>
<s>
The	O
solution	O
is	O
to	O
include	O
multiple	O
versions	O
of	O
the	O
same	O
code	O
that	O
uses	O
either	O
older	O
or	O
newer	O
SIMD	B-Device
technologies	O
,	O
and	O
pick	O
one	O
that	O
best	O
fits	O
the	O
user	O
's	O
CPU	B-General_Concept
at	O
run-time	O
(	O
dynamic	O
dispatch	O
)	O
.	O
</s>
<s>
Function	O
multi-versioning	O
(	O
FMV	O
)	O
:	O
a	O
subroutine	O
in	O
the	O
program	O
or	O
a	O
library	O
is	O
duplicated	O
and	O
compiled	O
for	O
many	O
instruction	B-General_Concept
set	I-General_Concept
extensions	O
,	O
and	O
the	O
program	O
decides	O
which	O
one	O
to	O
use	O
at	O
run-time	O
.	O
</s>
<s>
Library	O
multi-versioning	O
(	O
LMV	O
)	O
:	O
the	O
entire	O
programming	B-Library
library	I-Library
is	O
duplicated	O
for	O
many	O
instruction	B-General_Concept
set	I-General_Concept
extensions	O
,	O
and	O
the	O
operating	O
system	O
or	O
the	O
program	O
decides	O
which	O
one	O
to	O
load	O
at	O
run-time	O
.	O
</s>
<s>
FMV	O
,	O
manually	O
coded	O
in	O
assembly	B-Language
language	I-Language
,	O
is	O
quite	O
commonly	O
used	O
in	O
a	O
number	O
of	O
performance-critical	O
libraries	O
such	O
as	O
glibc	B-Language
and	O
libjpeg-turbo	O
.	O
</s>
<s>
Intel	B-Language
C++	I-Language
Compiler	I-Language
,	O
GNU	B-Application
Compiler	I-Application
Collection	I-Application
since	O
GCC	B-Application
6	O
,	O
and	O
Clang	B-Application
since	O
clang	B-Application
7	O
allow	O
for	O
a	O
simplified	O
approach	O
,	O
with	O
the	O
compiler	O
taking	O
care	O
of	O
function	O
duplication	O
and	O
selection	O
.	O
</s>
<s>
GCC	B-Application
and	O
clang	B-Application
requires	O
explicit	O
labels	O
in	O
the	O
code	O
to	O
"	O
clone	O
"	O
functions	O
,	O
while	O
ICC	O
does	O
so	O
automatically	O
(	O
under	O
the	O
command-line	O
option	O
)	O
.	O
</s>
<s>
The	O
Rust	B-Application
programming	I-Application
language	I-Application
also	O
supports	O
FMV	O
.	O
</s>
<s>
The	O
setup	O
is	O
similar	O
to	O
GCC	B-Application
and	O
Clang	B-Application
in	O
that	O
the	O
code	O
defines	O
what	O
instruction	B-General_Concept
sets	I-General_Concept
to	O
compile	O
for	O
,	O
but	O
cloning	O
is	O
manually	O
done	O
via	O
inlining	O
.	O
</s>
<s>
As	O
using	O
FMV	O
requires	O
code	O
modification	O
on	O
GCC	B-Application
and	O
Clang	B-Application
,	O
vendors	O
more	O
commonly	O
use	O
library	O
multi-versioning	O
:	O
this	O
is	O
easier	O
to	O
achieve	O
as	O
only	O
compiler	O
switches	O
need	O
to	O
be	O
changed	O
.	O
</s>
<s>
Glibc	B-Language
supports	O
LMV	O
and	O
this	O
functionality	O
is	O
adopted	O
by	O
the	O
Intel-backed	O
Clear	O
Linux	O
project	O
.	O
</s>
<s>
In	O
2013	O
John	O
McCutchan	O
announced	O
that	O
he	O
had	O
created	O
a	O
high-performance	O
interface	O
to	O
SIMD	B-Device
instruction	B-General_Concept
sets	I-General_Concept
for	O
the	O
Dart	B-Language
programming	I-Language
language	I-Language
,	O
bringing	O
the	O
benefits	O
of	O
SIMD	B-Device
to	O
web	O
programs	O
for	O
the	O
first	O
time	O
.	O
</s>
<s>
Instances	O
of	O
these	O
types	O
are	O
immutable	O
and	O
in	O
optimized	O
code	O
are	O
mapped	O
directly	O
to	O
SIMD	B-Device
registers	B-General_Concept
.	O
</s>
<s>
Operations	O
expressed	O
in	O
Dart	B-Language
typically	O
are	O
compiled	O
into	O
a	O
single	O
instruction	O
without	O
any	O
overhead	O
.	O
</s>
<s>
This	O
is	O
similar	O
to	O
C	B-Language
and	O
C++	O
intrinsics	O
.	O
</s>
<s>
Benchmarks	O
for	O
4×4	O
matrix	O
multiplication	O
,	O
3D	O
vertex	O
transformation	O
,	O
and	O
Mandelbrot	B-Algorithm
set	I-Algorithm
visualization	O
show	O
near	O
400%	O
speedup	O
compared	O
to	O
scalar	O
code	O
written	O
in	O
Dart	B-Language
.	O
</s>
<s>
McCutchan	O
's	O
work	O
on	O
Dart	B-Language
,	O
now	O
called	O
SIMD.js	O
,	O
has	O
been	O
adopted	O
by	O
ECMAScript	B-Language
and	O
Intel	O
announced	O
at	O
IDF	O
2013	O
that	O
they	O
are	O
implementing	O
McCutchan	O
's	O
specification	O
for	O
both	O
V8	B-Language
and	O
SpiderMonkey	B-Language
.	O
</s>
<s>
However	O
,	O
by	O
2017	O
,	O
SIMD.js	O
has	O
been	O
taken	O
out	O
of	O
the	O
ECMAScript	B-Language
standard	O
queue	O
in	O
favor	O
of	O
pursuing	O
a	O
similar	O
interface	O
in	O
WebAssembly	B-Language
.	O
</s>
<s>
As	O
of	O
August	O
2020	O
,	O
the	O
WebAssembly	B-Language
interface	O
remains	O
unfinished	O
,	O
but	O
its	O
portable	O
128-bit	O
SIMD	B-Device
feature	O
has	O
already	O
seen	O
some	O
use	O
in	O
many	O
engines	O
.	O
</s>
<s>
Emscripten	O
,	O
Mozilla	O
's	O
C/C	O
++	O
-to-JavaScript	O
compiler	O
,	O
with	O
extensions	O
can	O
enable	O
compilation	O
of	O
C++	O
programs	O
that	O
make	O
use	O
of	O
SIMD	B-Device
intrinsics	O
or	O
GCC-style	O
vector	O
code	O
to	O
the	O
SIMD	B-Device
API	B-Application
of	O
JavaScript	O
,	O
resulting	O
in	O
equivalent	O
speedups	O
compared	O
to	O
scalar	O
code	O
.	O
</s>
<s>
It	O
also	O
supports	O
(	O
and	O
now	O
prefers	O
)	O
the	O
WebAssembly	B-Language
128-bit	O
SIMD	B-Device
proposal	O
.	O
</s>
<s>
Though	O
it	O
has	O
generally	O
proven	O
difficult	O
to	O
find	O
sustainable	O
commercial	O
applications	O
for	O
SIMD-only	O
processors	O
,	O
one	O
that	O
has	O
had	O
some	O
measure	O
of	O
success	O
is	O
the	O
GAPP	B-General_Concept
,	O
which	O
was	O
developed	O
by	O
Lockheed	O
Martin	O
and	O
taken	O
to	O
the	O
commercial	O
sector	O
by	O
their	O
spin-off	O
Teranex	O
.	O
</s>
<s>
The	O
GAPP	B-General_Concept
's	O
recent	O
incarnations	O
have	O
become	O
a	O
powerful	O
tool	O
in	O
real-time	O
video	B-Algorithm
processing	I-Algorithm
applications	O
like	O
conversion	O
between	O
various	O
video	O
standards	O
and	O
frame	O
rates	O
(	O
NTSC	O
to/from	O
PAL	B-Language
,	O
NTSC	O
to/from	O
HDTV	B-Device
formats	O
,	O
etc	O
.	O
</s>
<s>
A	O
more	O
ubiquitous	O
application	O
for	O
SIMD	B-Device
is	O
found	O
in	O
video	O
games	O
:	O
nearly	O
every	O
modern	O
video	B-Application
game	I-Application
console	I-Application
since	O
1998	B-Application
has	O
incorporated	O
a	O
SIMD	B-Device
processor	O
somewhere	O
in	O
its	O
architecture	O
.	O
</s>
<s>
The	O
PlayStation	B-Device
2	I-Device
was	O
unusual	O
in	O
that	O
one	O
of	O
its	O
vector-float	O
units	O
could	O
function	O
as	O
an	O
autonomous	O
DSP	B-Architecture
executing	O
its	O
own	O
instruction	O
stream	O
,	O
or	O
as	O
a	O
coprocessor	O
driven	O
by	O
ordinary	O
CPU	B-General_Concept
instructions	O
.	O
</s>
<s>
3D	O
graphics	O
applications	O
tend	O
to	O
lend	O
themselves	O
well	O
to	O
SIMD	B-Device
processing	O
as	O
they	O
rely	O
heavily	O
on	O
operations	O
with	O
4-dimensional	O
vectors	O
.	O
</s>
<s>
Microsoft	O
's	O
Direct3D	B-Application
9.0	I-Application
now	O
chooses	O
at	O
runtime	O
processor-specific	O
implementations	O
of	O
its	O
own	O
math	O
operations	O
,	O
including	O
the	O
use	O
of	O
SIMD-capable	O
instructions	O
.	O
</s>
<s>
One	O
of	O
the	O
recent	O
processors	O
to	O
use	O
vector	B-Operating_System
processing	I-Operating_System
is	O
the	O
Cell	B-General_Concept
Processor	I-General_Concept
developed	O
by	O
IBM	O
in	O
cooperation	O
with	O
Toshiba	O
and	O
Sony	O
.	O
</s>
<s>
It	O
uses	O
a	O
number	O
of	O
SIMD	B-Device
processors	O
(	O
a	O
NUMA	B-Operating_System
architecture	O
,	O
each	O
with	O
independent	O
local	B-General_Concept
store	I-General_Concept
and	O
controlled	O
by	O
a	O
general	O
purpose	O
CPU	B-General_Concept
)	O
and	O
is	O
geared	O
towards	O
the	O
huge	O
datasets	O
required	O
by	O
3D	O
and	O
video	B-Algorithm
processing	I-Algorithm
applications	O
.	O
</s>
<s>
It	O
differs	O
from	O
traditional	O
ISAs	O
by	O
being	O
SIMD	B-Device
from	O
the	O
ground	O
up	O
with	O
no	O
separate	O
scalar	O
registers	B-General_Concept
.	O
</s>
<s>
Ziilabs	O
produced	O
an	O
SIMD	B-Device
type	O
processor	O
for	O
use	O
on	O
mobile	O
devices	O
,	O
such	O
as	O
media	O
players	O
and	O
mobile	O
phones	O
.	O
</s>
<s>
Larger	O
scale	O
commercial	O
SIMD	B-Device
processors	O
are	O
available	O
from	O
ClearSpeed	B-General_Concept
Technology	O
,	O
Ltd	O
.	O
and	O
Stream	O
Processors	O
,	O
Inc	O
.	O
ClearSpeed	B-General_Concept
's	O
CSX600	O
(	O
2004	O
)	O
has	O
96	O
cores	O
each	O
with	O
two	O
double-precision	O
floating	B-General_Concept
point	I-General_Concept
units	I-General_Concept
while	O
the	O
CSX700	O
(	O
2008	O
)	O
has	O
192	O
.	O
</s>
<s>
Their	O
Storm-1	O
processor	O
(	O
2007	O
)	O
contains	O
80	O
SIMD	B-Device
cores	O
controlled	O
by	O
a	O
MIPS	B-Device
CPU	B-General_Concept
.	O
</s>
