This code is designed to walk you through optimizing an example GPU application, starting from the basic CPU version. The accompanying slides are available here.
OpenCV is required in the example code simply to load and save an image file.
avg_filter.cu
is the main code, which demonstrates several different ways to implement a 3x3 image smoothing (averaging) filter on the GPU.helper_cuda.h
andhelper_string.h
are from the CUDA samples. They provide handy functions likegpuGetMaxGflopsDeviceId()
andcheckCudaErrors()
.lib_example/
contains a CUDA source file,hypot.cu
, which is compiled into a shared library and then used inhypot.py
.
- Finish slides
- Make pthreads example?
- Libraries (how to use e.g. cuBLAS)