Presentation is loading. Please wait.

Presentation is loading. Please wait.

Jared Barnes Chris Jackson.  Originally created to calculate pixel values  Each core executes the same set of instructions Mario projected onto several.

Similar presentations


Presentation on theme: "Jared Barnes Chris Jackson.  Originally created to calculate pixel values  Each core executes the same set of instructions Mario projected onto several."— Presentation transcript:

1 Jared Barnes Chris Jackson

2  Originally created to calculate pixel values  Each core executes the same set of instructions Mario projected onto several 2D planes

3  Chip is designed and manufactured by NVIDIA and AMD  Card bought by consumer is manufactured by various other companies

4  What does image processing try to accomplish?  Edit an image  Detect faces in an image  Find object edges in an image  Anything you can imagine  Too computationally intensive for a CPU?  Use a GPU!

5

6

7  Simple changes  Crop an image  Recolor an image  Move an image  Harder changes  Scale an image  Compress an image  Filter an image

8 // Iterate over all pixels in the image for( int x = 0; x < image.width; x++ ) { for( int y = 0; y < image.height; y++ ) { // Get the value of the current pixel Pixel pixel = image.getPixel(x, y); // Check that Red is more intense than Green if( pixel.red > pixel.green ) { // Check that Red is more intense than Blue if( pixel.red > pixel.blue ) { pixel.red = 0; pixel.green = 0; pixel.blue = 255; }

9 // Use the ID of this thread to calculate which // pixel to operate on int x = thread.Id % image.width; int y = thread.Id / image.height; // Get the value of this thread’s pixel Pixel pixel = image.getPixel(x, y); // Check that Red is more intense than Green if( pixel.red > pixel.green ) { // Check that Red is more intense than Blue if( pixel.red > pixel.blue ) { pixel.red = 0; pixel.green = 0; pixel.blue = 255; }

10  Compute Unified Device Architecture  GPU programming language developed by NVIDIA  GPUs have CUDA cores  more cores = more parallel performance

11

12  Have a graphics card with an NVIDIA GPU capable of running CUDA programs  Install CUDA tools and compiler for Visual Studio 2008, 2010, or 2012  Create a new CUDA project in Visual Studio

13

14

15

16 1. Parallelize VectorAdd() 2. Allocate GPU memory & copy data to it 3. Modify call to VectorAdd() to launch on GPU

17

18

19

20


Download ppt "Jared Barnes Chris Jackson.  Originally created to calculate pixel values  Each core executes the same set of instructions Mario projected onto several."

Similar presentations


Ads by Google