title: Parallelizing for loop
body: <p>I want to parallelize the following code with OpenMP: </p>
  
  <pre><code>  for(i=0; i&lt;n; i++)
      {
          int sum=0;
          for(j=0; j&lt;m; j++)
          {
              sum += A[i][j]*x[j];
          }
          y[i]=sum
      }
  </code></pre>
  
  <p>Would it work if I just add <code>#pragma omp parallel for</code> at the top? Or are there other (better) ways?</p>