Open main menu

CDOT Wiki β

Changes

GPU610/TeamKappa

271 bytes added, 17:15, 13 December 2015
Assignment 3 (Matt Jang)
; Optimize uses of __cosf and __sinf. : Since using the device functions made such a big change and since there were two identical calls to each, I stored the value of their result in a register and used the register twice. This didn't make such a big change but I am sure that if I had done it before using __cosf and __sinf, the difference would have been much bigger. On the smallest image, the tiem went from '''93μs to 91μs''' and on the largest image, the time went from '''1232μs to 1196μs'''.
; Experimental division optimization. : This last optimization made almost no difference but I more wanted to try something new. I changed "'''int col = index / rows;'''" to "'''int col = (index - row) / rows;'''". The idea is that if the computer gets a whole number from division, it would be a bit faster. I don't fully understand why it worked but there was a consistent speed up of around 0.5% to 1%. On the smallest image, the time went from '''91μs to 90μs''' and on the largest image, the time went from '''1196μs to 1191μs'''.
 
[[Image:Gpu610_matt_a3_1.png|chart|481px|chart]]
 
{| class="wikitable" border="1"
! Image Size !! Before !! After
|-
| 500 x 600 || 293 || 90
|-
| 800 x 800 || 613 || 188
|-
| 1600 x 900 || 1359 || 408
|-
| 1920 x 1080 || 2175 || 654
|-
| 2747 x 1545 || 3995 || 1191
|}
==== Unoptimized ====
1
edit