source: CIVL/examples/omp/DataRaceBench/micro-benchmarks/inneronly2-orig-no.c@ 3c8cc6c

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since 3c8cc6c was 36a61f3, checked in by Ziqing Luo <ziqing@…>, 9 years ago

Commit DataRaceBench into CIVL examples

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@4225 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 314 bytes
Line 
1//Example with loop-carried data dependence at the outer level loop.
2int main()
3{
4 int i,j;
5 int n=100, m=100;
6 double b[n][m];
7
8 for(i=0;i<n; i++)
9 for(j=0;j<n; j++)
10 b[i][j]=(double)(i*j);
11
12 for (i=1;i<n;i++)
13#pragma omp parallel for
14 for (j=1;j<m;j++)
15 b[i][j]=b[i-1][j-1];
16 return 0;
17}
Note: See TracBrowser for help on using the repository browser.