Learn C++ AMP
So you are a newbie to C++ AMP – you know nothing and want to quickly get started, we have you covered – keep on reading!
Step 1 – Do this first!
While it is typical for many to learn a new technology by writing your own "Hello World", if you don’t want to wander off into the minefield of GPU programming on your own, please start with what we provide in terms of articles and videos.
There are two articles specifically aimed at newcomers:
When you are done with the articles, please invest 68 minutes to sit back and watch 4 screencast videos:
- C++ AMP core API introduction
- Tiling Introduction
- Matrix Multiplication walkthrough
- GPU Debugging in Visual Studio 2012
Step 2 – optional if you are already an expert in GPU computing
At this point you’ve spent 2 hours and you understand not only how to hit the ground running with your own algorithms, but also how C++ AMP is positioned. This is important so if you skipped step 1, please go back and complete it before even reading on!
Now, if you are further familiar with other approaches, you may want to optionally browse one of our three learning guides: C++ AMP for the OpenCL Programmer, C++ AMP for the CUDA Programmer, and C++ AMP for the HLSL/DirectCompute Programmer.
Step 3 – Dive into code
This is probably the step most of you wanted to start with, and I hope you resisted until now. Now that you have the necessary theoretical background, it is time to explore our many samples and also the code in the open source libraries.
Both of these will help you internalize patterns for bringing C++ AMP into your own code base, and some of it may also be code that you can actually use as-is in your code. Go ahead and write your own algorithms, or convert your existing CPU code to use C++ AMP. If you run into situations where you need help, ask questions in our MSDN forum – given that you consumed the resources above, rest assured you won’t be asking newbie questions ;-)
Step 4 – Become an expert
After step 1 and step 3 and cutting your own code, you may feel like you are ready to take it to the next level and that you want to consume more advanced resources – here are some pointers
- Read all the blog posts that are linked from C++ AMP in a nutshell.
- If you plan to use C++ AMP in conjunction with existing DirectX code, read the blog post introducing the graphics namespace and the other blog posts it points to. You will also want to explore the blog post on DirectX Interop, and perhaps the direct3d namespace.
- Read the blog posts that help you get the best performance out of your C++ AMP code.
- Browse the official C++ AMP MSDN documentation, knowing that if you find any discrepancies between it and our blog then it means that you should trust our blog and file a bug for the documentation writer.
- Read the C++ AMP open specification.
- Read the first C++ AMP book.
- Take the first C++ AMP training course.
- Hire, and rub shoulders with, consultants who are experts on C++ AMP.