Lecture 5

Learning objectives

After this class, you should be able to:

  1. Write simple, but possibly inefficient, programs using CUDA, compile them using nvcc, and run them on a GPU accelerated system. In particular, you should be able to use the following features: (i) cudaGetDeviceCount, (ii) cudaSetDevice, (iii) cudaGetDevice, (iv) __global__, (v) blockIdx, (vi) threadIdx, (vii) cudaMalloc, (viii) cudaThreadSynchronize, (ix) cudaMemcpy, (x) cudaFree, and (xi) launch kernels.

Reading assignment

  1. Read Chapters 2 and 3 of Kirk and Hwu's GPU book (GPU-2, GPU-3 on Blackboard -- course library).
  2. Reference material: (i) CUDA Programming Guide and (ii) CUDA Reference Manual (both available on Blackboard -- course library).

Exercises and review questions


Last modified: 25 Jan 2010