Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Most of the time, when you see “accelerator,” you can think “GPU,” but the GPU is not the only accelerator and not all video cards have a GPU that can be used as a C++ AMP accelerator (for example, the card might not support DirectX 11). The object in the concurrency namespace, accelerator, represents not only a GPU but also possibly a virtual accelerator such as the emulator installed with Visual Studio or WARP (a CPU-side accelerator implemented using multicore and SSE instructions). It has memory that can hold one or more arrays, it can perform calculations on those arrays, and it is optimized for data-parallel computing.
The accelerator::get_all() function will return a vector of accelerators at run time, so that you could take different code paths depending on the configuration of the machine on which your code is executing. You can check the properties of an accelerator, for example, to discover whether it is an emulator or the CPU so you can make a decision more refined than simply whether an accelerator is present or not. You can also query its capabilities, such as whether an accelerator supports double precision. Some useful constants are defined that you can pass to constructors or use in comparisons: