title: c openmp parallel for inside a parallel region
body: <p>my question is like this <a href="https://stackoverflow.com/questions/11493265/for-loop-inside-parallel-region">one</a>. but i'd like to do something different...</p>
  
  <p>for instance, inside my parallel region i'd like to run my code on 4 threads. when each thread enters the for loop, i'd like to run my code on 8 threads. something like</p>
  
  <pre><code>#pramga omp parallel num_threads(4)
  {
      //do something on 4 threads
      #pragma omp parallel for num_threads(2)
      for(int i=0;i&lt;2;i++){
          //do something on 8 threads in total
      }
  }
  </code></pre>
  
  <p>so, is there a way to "split" each (4) running threads into two (new) threads so inside the for loop more (8) threads are running ?</p>