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.