Due: Friday, December 08 2017, 11:59 pm
This part explores parallel programming in the C language.
The end result of this part should be a set of programs that compare the performance of parallel v. non-parallel code to do the same task.
Write a function that sorts an array. Use parallelism to reduce the computation time. You can use sort functions from the standard library, like qsort in C, or write your own from scratch. Divide the task into N parts for N threads.
Your function does not need to be generic, but why not make it so?
As part of your experimentation, determine how computation time changes with both the number of threads and the size of the problem. Is using two threads twice as fast? Is using four threads four times as fast? What is the improvement in speed with additional threads?
Write a program that reads an image and applies a pixel-wise operator to it. Use parallelism to reduce the computation time. You can use this C-kit as the basis for your C example.
To compile the files, use the following.
gcc -o colorize -I. colorize.c ppmIO.c -lm
Compare computation times for the serial and parallel versions. You may need to process the image some number of times in order to make it slow enough to measure accurately.
As above, you should also compare how computation time depends upon the number of threads.
This part explores parallel programming in the selected languages.
For each of your chosen languages, discuss on a wiki page how parallelism is supported in the language, either implicitly or explicitly. This does not need to be a long description, but you may need to do a little research on this in order to be accurate.
The submission of this project has three components:
Please note that it is your responsibility to explicitly indicate the extensions you have taken. If your extensions have source codes, please indicate explicitly in the codes and README file. If you take the extensions in the selected languages that do not have source codes, please indicate explicitly in your wiki write-up.
© 2017 Ying Li. Page last modified: .