Changes

Jump to: navigation, search

GPU610/OctoPig

538 bytes added, 00:39, 21 February 2013
Chad's Profiling Findings
I decided to scrap the randomization part of the original program for now because I want to have consistent profile results every run. I chose to focus on the seed found [http://maximecb.github.com/Turing-Drawings/#6,4,1,2,0,1,3,1,4,3,3,1,3,0,5,2,1,4,2,0,2,1,1,4,1,0,1,3,0,5,1,3,1,1,3,0,1,1,2,3,3,5,1,1,3,1,0,3,1,2,1,1,1,1,3,3,3,2,2,2,3,3,2,1,3,5,3,0,2,3,2,4,1,1 here] because who doesn't love the Matrix. I also decided to only generate 1000 images each time the program is run.
After profiling I determined that 99% of the run was being spent in two functions, 89% and 10% respectively. It's also interesting to note that the function that took 89% gets called 70000 times. The code for the two functions is below.
<source lang="cpp">
}
</source>
 
Because ~90% of the run time is take up by one function it's really the only possible candidate for moving to the GPU and optimizing. Upon closer inspection though you can see that the update function only contains one for loop and the for loop essentially snakes through the image map 1 pixel at a time. I don't think it can be parallelized because each iteration is dependent on the one before. The image creation is reliant on the snaking effect.
'''Analysis:'''
1
edit

Navigation menu