title: OMP 2.0 Nested For Loops
body: <p>As I'm unable to use omp tasks (using visual studio 2015) I'm trying to find a workaround for a nested loop task. The code is as follows:</p>
  
  <pre><code>#pragma omp parallel
      {
          for (i = 0; i &lt; largeNum; i++)
          {
  #pragma omp single
          {
              //Some code to be run by a single thread
              memset(results, 0, num * sizeof(results[0]));
          }
  #pragma omp for
              for (n = 0; n &lt; num; n++) {
                  //Call to my function
                  largeFunc(params[n], &amp;resulsts[n])
              }
          }
  #pragma omp barrier
      }
  </code></pre>
  
  <p>I want all my threads to execute largeNum times, but wait for the memset to be set to zero, and then i want the largeFunc be performed by each thread. There are no data dependencies that I have found.</p>
  
  <p>I've got what the omp directives all jumbled in my head at this point. Does this solution work? Is there a better way to do without tasks?</p>
  
  <p>Thanks!</p>