source:
CIVL/examples/omp/DataRaceBench/micro-benchmarks/truedepseconddimension-var-yes.c@
e5cec5ae
| Last change on this file since e5cec5ae was 36a61f3, checked in by , 9 years ago | |
|---|---|
|
|
| File size: 321 bytes | |
| Line | |
|---|---|
| 1 | /* Only the outmost loop can be parallelized |
| 2 | */ |
| 3 | #include <stdlib.h> |
| 4 | int 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.
