Changes

Jump to: navigation, search

Group 6

1,149 bytes added, 21:38, 7 April 2019
The Monte Carlo Simulation (PI Calculation)
----
As this algorithm is based on random sampling, so there is only one function that does all the work.
 
Flat profile:
<pre>
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls Ts/call Ts/call name
101.05 0.02 0.02 calculatePI(int, float*)
0.00 0.02 0.00 1 0.00 0.00 _GLOBAL__sub_I__Z11calculatePIiPf
</pre>
 
Call graph
<pre>
granularity: each sample hit covers 2 byte(s) for 0.47% of 2.11 seconds
 
index % time self children called name
<spontaneous>
[1] 100.0 2.11 0.00 calculatePI(int, float*) [1]
-----------------------------------------------
0.00 0.00 1/1 __libc_csu_init [17]
[9] 0.0 0.00 0.00 1 _GLOBAL__sub_I__Z11calculatePIiPf [9]
-----------------------------------------------
Index by function name
 
[9] _GLOBAL__sub_I__Z11calculatePIiPf (a1.cpp) [1] calculatePI(int, float*)
</pre>
 
'''Results for different scale of calculation'''
[[File:Yihang.JPG]]
26
edits

Navigation menu