<s>
C++	B-Language
Accelerated	O
Massive	O
Parallelism	O
(	O
C++	B-Language
AMP	I-Language
)	O
is	O
a	O
native	O
programming	O
model	O
that	O
contains	O
elements	O
that	O
span	O
the	O
C++	B-Language
programming	I-Language
language	I-Language
and	O
its	O
runtime	B-Library
library	I-Library
.	O
</s>
<s>
It	O
provides	O
an	O
easy	O
way	O
to	O
write	O
programs	O
that	O
compile	O
and	O
execute	O
on	O
data-parallel	O
hardware	O
,	O
such	O
as	O
graphics	B-Device
cards	I-Device
(	O
GPUs	B-Architecture
)	O
.	O
</s>
<s>
Beginning	O
with	O
Visual	O
Studio	O
2022	O
(	O
version	O
17.0	O
)	O
,	O
C++	B-Language
AMP	I-Language
is	O
declared	O
as	O
deprecated	O
,	O
indicating	O
its	O
end	O
of	O
support	O
beyond	O
Visual	O
Studio	O
2022	O
.	O
</s>
<s>
C++	B-Language
AMP	I-Language
is	O
a	O
library	B-Library
implemented	O
on	O
DirectX	B-Application
11	I-Application
and	O
an	O
open	O
specification	O
from	O
Microsoft	O
for	O
implementing	O
data	O
parallelism	O
directly	O
in	O
C++	B-Language
.	O
</s>
<s>
It	O
is	O
intended	O
to	O
make	O
programming	O
GPUs	B-Architecture
easy	O
for	O
the	O
developer	O
by	O
supporting	O
a	O
range	O
of	O
expertise	O
from	O
none	O
(	O
in	O
which	O
case	O
the	O
system	O
does	O
its	O
best	O
)	O
to	O
being	O
more	O
finely	O
controllable	O
,	O
but	O
still	O
portable	O
.	O
</s>
<s>
In	O
Microsoft	O
's	O
implementation	O
,	O
code	O
that	O
cannot	O
be	O
run	O
on	O
GPUs	B-Architecture
will	O
fall	O
back	O
onto	O
one	O
or	O
more	O
CPUs	O
instead	O
and	O
use	O
SSE	O
instructions	O
.	O
</s>
<s>
The	O
initial	O
C++	B-Language
AMP	I-Language
release	O
from	O
Microsoft	O
requires	O
at	O
least	O
Windows	O
7	O
or	O
Windows	O
Server	O
2008	O
R2	O
.	O
</s>
<s>
As	O
C++	B-Language
AMP	I-Language
is	O
an	O
open	O
specification	O
it	O
is	O
expected	O
that	O
in	O
time	O
implementations	O
outside	O
Microsoft	O
will	O
appear	O
;	O
one	O
early	O
example	O
of	O
this	O
is	O
Shevlin	O
Park	O
,	O
Intel	O
's	O
experimental	O
implementation	O
of	O
C++	B-Language
AMP	I-Language
on	O
Clang/LLVM	O
and	O
OpenCL	B-Application
.	O
</s>
<s>
On	O
November	O
12	O
,	O
2013	O
the	O
HSA	B-Application
Foundation	I-Application
announced	O
a	O
C++	B-Language
AMP	I-Language
compiler	O
that	O
outputs	O
to	O
OpenCL	B-Application
,	O
Standard	B-Application
Portable	I-Application
Intermediate	I-Application
Representation	I-Application
(	O
SPIR	O
)	O
,	O
and	O
HSA	O
Intermediate	O
Language	O
(	O
HSAIL	O
)	O
supporting	O
the	O
current	O
C++	B-Language
AMP	I-Language
specification	O
.	O
</s>
<s>
C++	B-Language
AMP	I-Language
support	O
is	O
considered	O
obsolete	O
and	O
the	O
current	O
ROCm	O
1.9	O
series	O
will	O
be	O
the	O
last	O
to	O
support	O
it	O
.	O
</s>
<s>
The	O
basic	O
concepts	O
behind	O
C++AMP	B-Language
,	O
like	O
using	O
C++	B-Language
classes	O
to	O
express	O
parallel	O
and	O
heterogeneous	O
programming	O
features	O
,	O
have	O
been	O
inspirational	O
to	O
the	O
SYCL	B-Language
standard	O
.	O
</s>
<s>
Microsoft	O
added	O
the	O
restrict(amp )	O
feature	O
,	O
which	O
can	O
be	O
applied	O
to	O
any	O
function	O
(	O
including	O
lambdas	O
)	O
to	O
declare	O
that	O
the	O
function	O
can	O
be	O
executed	O
on	O
a	O
C++	B-Language
AMP	I-Language
accelerator	O
.	O
</s>
<s>
The	O
compiler	O
will	O
automatically	O
generate	O
a	O
compute	B-Operating_System
kernel	I-Operating_System
,	O
saving	O
the	O
boilerplate	O
of	O
management	O
and	O
having	O
to	O
use	O
a	O
separate	O
language	O
.	O
</s>
<s>
The	O
restrict	O
keyword	O
instructs	O
the	O
compiler	O
to	O
statically	O
check	O
that	O
the	O
function	O
uses	O
only	O
those	O
language	O
features	O
that	O
are	O
supported	O
by	O
most	O
GPUs	B-Architecture
,	O
for	O
example	O
,	O
void	O
myFunc( )	O
restrict(amp )	O
 { … } 	O
</s>
<s>
Microsoft	O
or	O
other	O
implementer	O
of	O
the	O
open	O
C++	B-Language
AMP	I-Language
specification	O
could	O
add	O
other	O
restrict	O
specifiers	O
for	O
other	O
purposes	O
,	O
including	O
for	O
purposes	O
that	O
are	O
unrelated	O
to	O
C++	B-Language
AMP	I-Language
.	O
</s>
<s>
Beyond	O
the	O
new	O
language	O
feature	O
,	O
the	O
rest	O
of	O
C++	B-Language
AMP	I-Language
is	O
available	O
through	O
the	O
<amp.h>	O
header	O
file	O
in	O
the	O
concurrency	O
namespace	O
.	O
</s>
<s>
The	O
key	O
C++	B-Language
AMP	I-Language
classes	O
are	O
:	O
array	O
(	O
container	O
for	O
data	O
on	O
an	O
accelerator	O
)	O
,	O
array_view	O
(	O
wrapper	O
for	O
data	O
)	O
,	O
index	O
(	O
N-dimensional	O
point	O
)	O
,	O
extent	O
(	O
N-dimensional	O
size	O
)	O
,	O
accelerator	O
(	O
computational	O
resource	O
,	O
such	O
as	O
a	O
GPU	B-Architecture
,	O
on	O
which	O
to	O
allocate	O
memory	O
and	O
execute	O
)	O
,	O
and	O
accelerator_view	O
(	O
view	O
of	O
an	O
accelerator	O
)	O
.	O
</s>
<s>
There	O
is	O
also	O
a	O
global	O
function	O
,	O
parallel_for_each	O
,	O
which	O
you	O
use	O
to	O
write	O
a	O
C++	B-Language
AMP	I-Language
parallel	O
loop	O
.	O
</s>
