cs179 2017 Lec01
cs179 2017 Lec01
Lecture 1: Introduction
Images: http://en.wikipedia.org
http://www.pcper.com
http://northdallasradiationoncology.com/
GPU Gems (Nvidia)
Administration
Covered topics:
• (GP)GPU computing/parallelization
• C++ CUDA (parallel computing platform)
TAs:
• cs179.ta@gmail.com
• Parker Won (jwon@caltech.edu)
• Nailen Matchstick (nailen@caltech.edu)
• Jordan Bonilla (jbonilla@caltech.edu)
Website:
• http://courses.cms.caltech.edu/cs179/
Overseeing Instructor:
• Al Barr (barr@cs.caltech.edu)
Class time:
• ANB 105, MWF 3:00 PM
• Recitations on Fridays
Course Requirements
Raytracing:
for all pixels (i,j):
Calculate ray point and direction in 3d space
if ray intersects object:
calculate lighting at closest object
store color of (i,j) Superquadric Cylinders, exponent 0.1, yellow glass balls, Barr, 1981
EXAMPLE
On the CPU:
...
In each thread,
For (i from beginning region of thread)
C[i] <- A[i] + B[i]
//lots of waiting involved for memory reads, writes, ...
Wait for threads to synchronize...
• Context switching:
• High penalty on the CPU
• Not an issue on the GPU
A simple problem…
• On the GPU:
http://gamedevelopment.tutsplus.com/articles/the-end-of-
fixed-function-rendering-pipelines-and-how-to-move-on--
cms-21469
Source: Super Mario 64, by Nintendo
GPUs – Brief History
• Shaders
• Could implement one’s own functions!
• GLSL (C-like language)
• Could “sneak in” general-purpose programming!
http://minecraftsix.com/glsl-shaders-mod/
GPUs – Brief History