-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
The C++ Programmer's Mindset
By :
Over the past 20 years, general-purpose GPU programming has exploded into the mainstream, especially in the context of machine learning. GPUs excel at high-throughput, massively parallel number crunching on a large scale; they were originally designed to compute coordinate transforms of voxels and textures in 3D graphics applications at very high speed. Now, they have been expanded to a very flexible computation tool that can be a huge asset for solving problems.
Programming with GPUs splits the code into two parts: the host code that runs on the main computer, and the device code that runs on the GPU. One cannot simply take ordinary functions and run them on a GPU. Instead, one must instruct the compiler to produce device functions by marking them with the __device__ attribute. Moreover, one cannot just call these from the host, and they must be scheduled by the runtime library and driver by launching a kernel. A kernel is a special function that...