Changes

Jump to: navigation, search

Avengers

644 bytes added, 23:49, 6 April 2019
Assignment 2
For Assignment 2, we decided to parallelize the application selected by Bruno.
In the code, the function that took up a significant amount of time was the calculateDimensions() function. The flat profile indicates that this function takes 97.67% of the execution time.
 
Link to code on GitHub: https://github.com/brucremo/DPS915
==== Identifying Parallelize-able Code ====
[[File:OptimizationGraph.PNG]]
 
==== Other Optimizations ====
 
Another optimization would be to optimize the original algorithm itself. The pow() function itself very expensive because it is software implemented. A better alternative would be to use hardware functions. In this case, it would be quicker to use the (*) operator and multiply the values with themselves as opposed to setting them to the power of 2.
 
[[File:OptimizedAlgorithm.PNG]]
 
After modifying the code to reflect this change, both the GPU and CPU methods are roughly equal to each other (in terms of execution time) when the value of n is 800.
38
edits

Navigation menu