Changes

Jump to: navigation, search

GPU610/TeamKappa

55 bytes added, 17:16, 13 December 2015
Image Rotation
; 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'''.
 
==== Kernel Speeds ====
[[Image:Gpu610_matt_a3_1.png|chart|481px|chart]]
! Image Size !! Before !! After
|-
| 500 x 600 || 293 293μs || 9090μs
|-
| 800 x 800 || 613 613μs || 188188μs
|-
| 1600 x 900 || 1359 1359μs || 408408μs
|-
| 1920 x 1080 || 2175 2175μs || 654654μs
|-
| 2747 x 1545 || 3995 3995μs || 11911191μs
|}
1
edit

Navigation menu