Channels ▼
RSS

C/C++

C++AMP: Accelerated Massive Parallelism


The next version of Microsoft Visual C++ will introduce C++ Accelerated Massive Parallelism, also known as "C++ AMP." Herb Sutter announced C++ AMP and unveiled Microsoft's plans to provide heterogeneous platform support in Visual C++. The first targets are GPU (Graphics Processing Unit) and APU (Accelerated Processing Unit) programming but the platform would be ready for other compute accelerators.

DirectCompute has been part of the Microsoft DirectX collection of APIs since the release of DirectX 11 and it provided some support for GPGPU (General-Purpose Computing on Graphics Processing Units). You can use DirectCompute to run general-purpose code on the GPUs that provide support for this API.

However, Microsoft wants to lower the barrier to entry for heterogeneous hardware programmability. C++ AMP builds on DirectCompute, introduces one core C++ language extension and makes it part of Visual C++, and integrates it with Visual Studio. GPUs are found in discrete cards or integrated in the microprocessors, and therefore, interest in GPGPU is growing fast. For example, the Intel Sandy Bridge microarchitecture, introduced in the second-generation Intel Core processor family, integrates a GPU with a CPU on a single chip.

Parallel programming is hard and heterogeneous hardware programmability combined with parallelism is even harder. However, C++ AMP introduces an STL-like library for multidimensional data, allowing you to use your existing C++ STL knowledge. Thus, if you are a Visual C++ developer, you don't have to learn a new language or combine C++ with C. In addition, you can use the same compiler: the Visual C++ compiler.

So far, C++ AMP is a minimal API that introduces a few basic elements; hence, it is easy to tackle the complete API in a few days. However, you will have to use lambda expressions, so it is very important to have some experience with them before trying to master the C++ AMP code samples. In addition, you will have to learn the target-specific language restrictions.

Microsoft plans to make C++ AMP an open specification and promises a seamless integration with the next Visual Studio version. Thus, we should be able to edit, build, debug, and profile C++ AMP within the Visual Studio IDE. It will be very interesting to work with the first CTP (Community Technology Preview) to see which debugging and profiling features will be available for C++ AMP.

We will have to wait for the next Visual Studio release to start working with C++ AMP. In the meantime, you can watch the demonstration "Blazing-fast code using GPUs and more, with C++ AMP" presented by Daniel Moth, a program manager on Microsoft's Parallel Computing Platform Team. You can also download the slides from his presentation here.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 

Video