source: CIVL/examples/omp/DataRaceBench/micro-benchmarks/truedepseconddimension-var-yes.c@ e5cec5ae

1.23 2.0 main test-branch
Last change on this file since e5cec5ae 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: 321 bytes
RevLine 
[36a61f3]1/* Only the outmost loop can be parallelized
2 */
3#include <stdlib.h>
4int main(int argc, char* argv[])
5{
6 int i,j;
7 int len = 1000;
8 if (argc>1)
9 len = atoi(argv[1]);
10
11 int n=len, m=len;
12 double b[n][m];
13
14 for (i=0;i<n;i++)
15#pragma omp parallel for
16 for (j=1;j<m;j++)
17 b[i][j]=b[i][j-1];
18
19 return 0;
20}
21
Note: See TracBrowser for help on using the repository browser.