Microsoft has published the specification for C++ AMP (Accelerated Massive Parallelism), its new system for heterogeneous parallel processing in C++. When Microsoft first announced C++ AMP in June last year, it said that it wanted to make the AMP specification open to all.
AMP has been developed by Microsoft with input from AMD and NVIDIA. Microsoft’s implementation allows AMP programs to use both the main CPU and Direct3D video cards (via the company’s DirectCompute API), though the specification should also permit OpenGL/OpenCL-based implementations.
Microsoft encourages other compiler developers to implement the technology. The published specification includes within it an irrevocable promise to not assert claims on any patents that Microsoft may hold that are relevant to AMP unless the implementing party sues Microsoft for patent infringement.
AMP is some pretty cool stuff. Programs are written in C++, and blocks that should be computed in parallel (whether on the CPU or the video card) are annotated (and restricted) in various ways but are kept inline with the rest of the C++ program, and so look just like C++.
The closest equivalent to AMP is OpenCL. OpenCL is also designed for heterogeneous parallel computing, and is also not tied to any specific video card manufacturer. OpenCL is based on C rather than C++, with the GPU functions written in a restricted form of C99 rather than a restricted C++.