Is there a simple `parallel for` in golang like OpenMP?
<p>I'm trying to optimise a puzzle with parallel processing, for better performance.</p>

<p>Ideally, in C99 w/ OpenMP, I should be able to do that with the help of a <code>#pragma omp parallel for</code> prior to a <code>for</code> loop in question, and then it should be up to the system to distribute the load between the CPUs.</p>

<p>The official documentation for Go at <a href="https://golang.org/doc/effective_go.html#parallel" rel="nofollow">https://golang.org/doc/effective_go.html#parallel</a>, however, seems to suggest that for parallel processing I must, (0), manually get the number of cores from the runtime environment, (1), loop over said cores, (2), effectively code up a distinct for loop for each core, (3), loop over the cores once again to make sure all the stuff got processed.</p>

<p>Am I missing something?  For the simplest case, is OpenMP with the ancient C superior to the brand new Go that's touted as C's best replacement?  For a more complicated example, how exactly do you split up a <code>range</code> between the CPUs?</p>