Parallel Programming#
The Power of Parallelism#
Given a nXm gray level image, generate a binary image so that the value if any pixel is 1 if and only if the gray level of the original pixel is great than a given threshold.
Algorithm?
Time?
Can we improve?

GPU – Graphics Processing Unit#






CPU Over the Years#
Smaller
Faster
Less power
More on a chip

Clock Frequency Over the Years#
Improvement stopped because:
Heat
Need a lot of power

Solution:









CPU is good at:#















Blurring Images in Parallel#

Use an average filter to blur a gray level image
Note the synchronization



Tells the compiler that this is a function that runs on GPU



Be careful of race conditions!





Not a stencil because not working on each cell
