Look out, OpenCL. Microsoft has set its sights on the democratization of development for heterogeneous systems, and it's pulled out the big guns. At the AMD Fusion Developer Summit today, Microsoft's Herb Sutter announced an extension to the C++ language designed to let programmers tap into any DirectCompute-capable graphics hardware for general-purpose tasks. Microsoft calls the new extension C++ Accelerated Massive Parallelism, or C++ AMP for short, and it aims to make it an open spec that can be implemented on non-Microsoft platforms with non-Microsoft compilers.
Sutter presented C++ AMP as a way to cut through what he called the "jungle of heterogeneity." The PowerPoint slide below illustrates the full extent of that jungle as Sutter sees it, with processors in increasing order of specialization on the Y axis and memory systems in increasing order of non-uniformity and disjointedness mapped to the X axis. It's definitely not pretty:
C++ currently gives developers free reign in the bottom left corner of that jungle, Sutter said, but C++ AMP expands the roaming area dramatically. Not only that, but Microsoft hopes to support other specialized processors with future releases of C++ AMP, thus extending its domain over time.
So, what does C++ AMP entail? Sutter bills it as "minimal," and indeed, the list of additions is a short one:
The additions on which Sutter dwelt the most are array_view
(The code on the left is regular C++, while the code on the right is C++ AMP. That man in the bottom right corner is Microsoft's Daniel Moth, who got into the nitty-gritty details of C++ AMP during a technical session after Sutter's keynote.)
Now, there will be restrictions on what can go inside, er, restrict()-ed functions, since DirectCompute-capable GPUs can only support a subset of the C++ language. Nevertheless, programs written with C++ AMP will be compiled as single executables capable of making use of DirectCompute-capable hardware if it's there. (I'm guessing developers will be able to include fallback code paths so systems without DirectCompute GPUs can just use the CPU to do the work.)
Microsoft said it will include C++ AMP support in the next version of Visual Studio. Of course, since C++ AMP is an open spec, Visual Studio won't be the only way to write C++ AMP code and compile it. In fact, Sutter said Microsoft and AMD are already working together on non-Windows compilers. (Lest you think Nvidia is being left out, a post on Nvidia's blog says the firm "continues to work closely with Microsoft to help make C++ AMP a success.")
|TR subscriptions: our progress so far||35|
|Friday Night Shortbread||27|
|Friday night topic: Where is that plane?||132|
|WSJ: Microsoft, Google pressure Asus into shelving dual-OS tablet||35|
|Deal of the week: Discounted tablets, wireless keyboards, cheap SSDs, and more||12|
|Fractal's double-wide Node 804 case can swallow a dozen drives||51|
|Xbox One tightens gap with PS4 in U.S. shipments||53|
|Amazon Prime gets a price hike; Google Drive gets a price cut||48|