Chapter 2. CUDA Essentials
Our discussion in Chapter 1, “First Steps,” left off with the function distanceArray()
, which computes distance values from a reference point to an array of input locations. The computation is completely serial; the values are computed in a sequence as the index i
in a for
loop increments over the range of input array elements. However, the computation of any one of the distance values is independent of the other computations. In a serial implementation, we do not take advantage of the independence and instead wait until one entry in the array is computed before moving on to the next. There is no particular downside to the serial approach if you are using a simple system that can only do one computation at a time. However, ...
Get CUDA for Engineers: An Introduction to High-Performance Parallel Computing 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.