Microsoft Publishes C++ AMP Spec, Wants to Lower Barriers to Data-Parallelism
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:
...gives 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#.)