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:
• [email protected]
• Parker Won ([email protected])
• Nailen Matchstick ([email protected])
• Jordan Bonilla ([email protected])
Website:
• http://courses.cms.caltech.edu/cs179/
Overseeing Instructor:
• Al Barr ([email protected])
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