Open main menu

CDOT Wiki β

Changes

DPS921/Halt and Catch Fire

9 bytes added, 19:40, 1 December 2016
Parallel
As you can see only one core is work to compute the value of Pi - '''CPU8 @ 100%'''<br/>
[[Image:Cpu.PNG|alt=Monte Carlo Simulations]]
===== Pi - Parallel =====
<syntaxhighlight lang="go">
func MultiPIParallelPI(samples int) float64 {
runtime.GOMAXPROCS(runtime.NumCPU())
}
</syntaxhighlight>
 
===== Parallel execution CPU profile =====
As you can see all cores are working to compute the value of Pi - '''CPU1-8 @ 100%'''<br/>
147
edits