Hello Again, but in Parallel
The objective of using GPUs is to exploit parallelism to accelerate the execution of our programs. For that, we must understand the parallel model that GPUs make available. In this chapter we’ll first learn about the SIMD execution model and discuss a simple program to test number primality in parallel, but using an approach which makes it almost like a CPU application. Then we will learn more about moving data to and from the GPU, since its memory is separated from the main system. The chapter closes with a section presenting a simple program that fully benefits from the use of GPUs.
Thus in this chapter we’re going to cover the following main topics:
- SIMD execution model
- Primality test with a not-so-parallel program
- Moving memory
- Vector addition in full parallel