title: Parallel OpenMP loop with break statement
body: <p>I know that you cannot have a break statement for an OpenMP loop, but I was wondering if there is any workaround while still the benefiting from parallelism. Basically I have 'for' loop, that loops through the elements of a large vector looking for one element that satisfies a certain condition. However there is only one element that will satisfy the condition so once that is found we can break out of the loop, Thanks in advance</p>
  
  <pre><code>for(int i = 0; i &lt;= 100000; ++i)
    {
      if(element[i] ...)
       {
            ....
            break;
        }
     }
  </code></pre>