Changes

Jump to: navigation, search

TudyBert

2,993 bytes added, 09:02, 19 April 2013
Drive_God
'''zfunr''' and '''ordres''' take the majority of the total run time so we'll focus on parallelizing these two subroutines first.
 === Assignment 1 UPDATE ===Sad news for Team Tudybert, but we were unable to successfully compile the project using CUDA libraries. The issue was the dynamic nature of the CUDA libraries. There's a "-static" flag that's being added in the makefile of Drive_God_lin that prevents dynamic libraries from being used, and CUDA libraries are all dynamic. This flag was there in the original makefile and removing it causes the program to throw undefined references to a few methods that I was unable to find in the source code or online. I'm assuming that since this flag was put in place by a coder from CERN, removing it is going to require changes to the code that are beyond my abilities. As such, I've switched projects to Natalia's image processing application.    === Assignment 1 Revisted===  I can't thank Natalia enough for letting me use her program! This was an extremely last minute switch so I was fortunate to find a new project so quickly. I'm now working on parallelizing a very basic image processing application. The application supports the .PGM file format - an image file that was designed to be easy to learn and write programs for. This file contains the type of image (in our case P5), the file name, the number of rows and columns, and the data in the form of a 2D array. There's no compression and all data is readable with a text editor. The main source for the application can be found here [http://www.dreamincode.net/forums/topic/76816-image-processing-tutorial/]. The initial source is written in C++ and contains methods for enlarging, shrinking, translating, rotating, negating, and reflecting images. Natalia has already parallelized the negate method, so it was agreed that I would pick one of the others. I chose the enlarge image method.   Here's the flat profile for 50 runs of enlarging a 512px x 512px image 4 times:    % cumulative self self total time seconds seconds calls ms/call ms/call name 49.64 1.39 1.39 50 27.80 27.80 Image::operator=(Image const&) 28.93 2.20 0.81 50 16.20 16.20 Image::Image(int, int, int) 19.64 2 .75 0.55 Image::enlargeImage(int, Image&) 1.07 2.78 0.03 4194304 0.00 0.00 Image::getPixelVal(int, int)  The code for enlarge image:  void Image::enlargeImage(int value, Image& oldImage){ int rows, cols, gray; int pixel; int enlargeRow, enlargeCol; rows = oldImage.N * value; cols = oldImage.M * value; gray = oldImage.Q; Image tempImage(rows, cols, gray); for(int i = 0; i < oldImage.N; i++) { for(int j = 0; j < oldImage.M; j++) { pixel = oldImage.pixelVal[i][j]; enlargeRow = i * value; enlargeCol = j * value; for(int c = enlargeRow; c < (enlargeRow + value); c++) { for(int d =enlargeCol; d < (enlargeCol + value); d++) { tempImage.pixelVal[c][d] =pixel; } } } } oldImage =tempImage;}
=== Assignment 3 ===
1
edit

Navigation menu