Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In Chapter 1 of this book “Overview and C++ AMP Approach,” you saw some very simple C++ AMP code to add and multiply matrices. In Chapter 2, you saw a working case study of C++ AMP in action. Before drilling down further into details such as tiling, using multiple accelerators, or effective ways to “mix and match” CPU and GPU acceleration, it’s a good idea to review the fundamentals of C++ AMP and ensure that you’re clear on all the concepts. C++ AMP consists almost entirely of library code. The two language changes are the restrict keyword, discussed in this chapter, and the tile_static keyword, discussed in Chapter 4. Everything else is provided through the amp.h header, primarily in the form of templates.