How do you break the cycle?



  • I have a trace of the code.

    for (;;)
    {
       do
      {
       //тут нужно расспараллелить
      }
    }
    

    I'd like to break what's in the cycle. But the problem is, if I write a "pragma omp parallel where it needs to be melted, it will create and remove flows as many times as do. I'd like to say, as far as I can, that we need to create two flows that will fulfil this code, and they need not be removed and 100,500 times created.



  • omp_set_dynamic + omp_set_num_threads will prevent changes in the number of flows and establish this number, respectively.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2