On Thu, Mar 20, 2014 at 10:27:20AM +0100, Tobias Burnus wrote:
> > 3) GCC OpenMP implementation supports loop construct without parallel.

It is not about GCC OpenMP implementation, it is the standard that requires
it.  If you have an orphaned #pragma omp for e.g., you still can call the
containing function from inside of #pragma omp parallel and then it should
be properly distributed across the threads.  Of course with OpenMP you
can enter orphaned #pragma omp for even from outside of parallel region,
but that in OpenMP terms is essentially just a degenerated parallel with a
single thread only, so you have to distribute it across the single thread.
Same thing as if you do
#pragma omp parallel num_threads(1) (or if(0))
{
...
  #pragma omp for
}

        Jakub

Reply via email to