1
edit
Changes
→Calculations of Pi
'''(Note)'''
For some reason the code crashes my graphic driver past 8000000 (8 million) dots, and even at 8 million it crashes most of the time. The Nvidia Visual Profiler doesn't work either, it gets stuck on generating timeline, so I used clock_t in the code instead in order to calculate execution time of but the kernel. Don't think this value is 100% accurate thoughstill correct.
'''Approach'''
[[File:Code2.JPG]]
'''Value Execution Times for Values of 1 , 5 and 8 Million'''
[[File:MillionMonteCarloreportTime.JPG]]
'''Value of 5 MillionComparison Chart''' [[File:ChartMonteCarlo.JPG]]
'''Value of 8 MillionIssues'''
Another big issue was the crashing of the graphic driver. If the program takes more than 3 seconds to execute, the driver would crash. Even when I changed the registry to allow 15 seconds before crashing, it still crashes at 3.
For optimization, I tried using reduction, however it didn't seem to speed up the program. ''Comparison Chart'Different Approach'''