Advertisement
Guest User

Untitled

a guest
Dec 7th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. /* --- MAIN LOOP --- repeat test cases NTIMES times --- */
  2. scalar = 3.0;
  3. #pragma omp parallel for
  4. for (k=0; k<NTIMES; k++)
  5. {
  6.  
  7.  
  8. times[k] = omp_get_wtime();
  9. #pragma omp parallel
  10. for (j=0; j<N; j++)
  11. a[j] = b[j]+scalar*c[j];
  12.  
  13. times[k] = omp_get_wtime() - times[k];
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement