Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Microsoft Publishes C++ AMP Spec, Wants to Lower Barriers to Data-Parallelism

Microsoft Publishes C++ AMP Spec, Wants to Lower Barriers to Data-Parallelism

Leia em Português

This item in japanese


Microsoft released their open specification (PDF) for C++ Accelerated Massive Parallelism (C++ AMP) to coincide with their GoingNative 2012 event. C++ AMP is described as "a programming model that enables the acceleration of C++ code on data-parallel hardware". The most common example of such hardware would be the GPU on a discrete graphics card with the ability to use multi-core/SSE CPUs as an alternative.

Microsoft states that the C++ AMP programming model: you explicit control over the above aspects: copying data between CPU and accelerator, and the computations performed on the GPU. You can explicitly manage all communication between the CPU and the accelerator, and this communication can be either synchronous or asynchronous. The data-parallel computations that are performed on the accelerator are expressed by using multi-dimensional arrays, high-level array-manipulation functions, multi-dimensional indexing operations, and other high-level abstractions, all of which are based on a large subset of the C++ programming language. The programming model contains multiple layers so that you can trade off ease-of-use with maximum performance. 

Microsoft's implementation of this standard can be used on any system running DirectX 11, but if its not present a non-C++ version of the code would be executed. Microsoft does not intend for C++ AMP to be Windows-only, as it "supports and encourages anyone to implement the C++ AMP open specification on any platform..."  (emphasis in the original.) To date the project reflects contributions from both Nvidia and AMD. To encourage outside implementations, Microsoft has released the entire C++ AMP specification under the terms of Microsoft's Community Promise.

Interoperability between C++ AMP and Direct 3D is supported in Microsoft's implementation but not required by the formal specification. Interoperability with OpenGL is not currently supported, and a recent forum posting by developer Daniel Moth indicates that this support is not forthcoming as "nobody here [on the C++ AMP team] has experience with OpenGL".

Developers looking to try out the new C++ AMP programming model can do so by downloading the Visual Studio 11 Developer Preview and then reviewing the sample code presented by this MSDN blog entry. (This code also includes examples on how .NET Developers can utilize C++ AMP from C#.)

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p