source:
CIVL/mods/dev.civl.abc/examples/omp/pragmaScope.c
| Last change on this file was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 337 bytes | |
| Line | |
|---|---|
| 1 | // This example exposes the problem of have a pragma and a following statement in the same scope without brackets. |
| 2 | int main(){ |
| 3 | int i,j; |
| 4 | int n=10, m=10; |
| 5 | int a[n][m]; |
| 6 | |
| 7 | for(i=0;i<n; i++) |
| 8 | for(j=0;j<n; j++) |
| 9 | a[i][j]= 0; |
| 10 | |
| 11 | for (i=0;i<n-1;i++) |
| 12 | #pragma omp parallel for |
| 13 | for (j=0;j<m-1;j++) |
| 14 | a[i][j]=a[i+1][j+1]; |
| 15 | } |
Note:
See TracBrowser
for help on using the repository browser.
