source:
CIVL/examples/omp/DataRaceBench/micro-benchmarks/truedepseconddimension-orig-yes.c@
3c8cc6c
| Last change on this file since 3c8cc6c was 36a61f3, checked in by , 9 years ago | |
|---|---|
|
|
| File size: 331 bytes | |
| Rev | Line | |
|---|---|---|
| [36a61f3] | 1 | /* Only the outmost loop can be parallelized |
| 2 | */ | |
| 3 | #include <stdlib.h> | |
| 4 | #include <stdio.h> | |
| 5 | double b[1000][1000]; | |
| 6 | ||
| 7 | int main(int argc, char* argv[]) | |
| 8 | { | |
| 9 | int i,j; | |
| 10 | int n=1000, m=1000; | |
| 11 | for (i=0;i<n;i++) | |
| 12 | #pragma omp parallel for | |
| 13 | for (j=1;j<m;j++) | |
| 14 | b[i][j]=b[i][j-1]; | |
| 15 | ||
| 16 | printf("b[500][500]=%f\n", b[500][500]); | |
| 17 | return 0; | |
| 18 | } | |
| 19 |
Note:
See TracBrowser
for help on using the repository browser.
