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

by Jeff Martin on Feb 08, 2012 |

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.

Tell us what you think

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

Email me replies to any of my messages in this thread
Community comments

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

Email me replies to any of my messages in this thread

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

Email me replies to any of my messages in this thread

General Feedback
Marketing and all content copyright © 2006-2016 C4Media Inc. hosted at Contegix, the best ISP we've ever worked with.
Privacy policy

We notice you're using an ad blocker

We understand why you use ad blockers. However to keep InfoQ free we need your support. InfoQ will not provide your data to third parties without individual opt-in consent. We only work with advertisers relevant to our readers. Please consider whitelisting us.