Chapter 7

Using CUDA in Practice

Introduction

In this chapter we’ll look at a few examples of the not-so-common uses of GPUs to provide insight into how to solve a number of different types of computer problems. We’ll look at the problems involved in using GPUs for such computations.

Serial and Parallel Code

Design goals of CPUs and GPUs

CPUs and GPUs, although both execute programs, are a world apart in their design goals. CPUs use an MIMD (multiple instruction, multiple data) approach, while GPUs use an SIMT (single instruction, multiple thread) instruction model.

The CPU approach to parallelism is to execute multiple independent instruction streams. Within those instruction streams it seeks to extract instruction level parallelism. That ...

Get CUDA Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.