Changes

Jump to: navigation, search

DPS921/Halt and Catch Fire

9 bytes added, 20: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

Navigation menu