With Visual Studio 2012, you are able to get your hands on a new technology that enables you to tap into the power of heterogeneous hardware and specifically take advantage of accelerators such as the GPU for compute purposes: C++ AMP.
So you’ll create an empty C++ project, add a new code file, stick a
#include <amp.h> at the top, then add a
using namespace concurrency; and then what? I suggest you try typing in our example C++ AMP matrix multiplication code, and trying it out on your DirectX 11 hardware, or download one of our many C++ AMP samples. including the simplistic “Hello World” code.
Then, you can play around with all the new constructs we’ve added, following the description of each from the following posts:
- tiled parallel_for_each including tiled_index and tiled_grid
Beyond the core API above, there is even more for you to explore
- graphics namespace (textures and short vector types)
- Interop with DirectX
- global copy operations and continuations
- Atomic operation library
- Math library
- Three debug functions: printf, errorf, abort
- Twenty direct3d functions
If the above is not enough reading, you can read the 130 pages of the C++ AMP open specification.
Beyond the API and language, there is fantastic Visual Studio integration (intellisense, code navigation, project and build system, etc) and in particular I encourage you to explore the support for
You’ll no doubt have questions and feedback, and we truly look forward to taking those in our dedicated Native Parallelism forum. Enjoy!