39
edits
Changes
→Assignment 3
Furthermore, I previously put the "check for bounds" calculation and the "fill in empty pixels" calculation inside two separate nested for-loops. I have combined them into one, removing one nested for loops which will increase performance dramatically.
Overall, this is what the optimized rotateImage() function and the rotate() kernel looks like:
Profiling with the same images gives the following result.