1.23
2.0
main
test-branch
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * Outer loop has loop carried true dependence
|
|---|
| 3 | */
|
|---|
| 4 | #include <stdlib.h>
|
|---|
| 5 | int main(int argc, char* argv[])
|
|---|
| 6 | {
|
|---|
| 7 | int i,j;
|
|---|
| 8 | int len = 1000;
|
|---|
| 9 | if (argc>1)
|
|---|
| 10 | len = atoi(argv[1]);
|
|---|
| 11 |
|
|---|
| 12 | int n=len, m=len;
|
|---|
| 13 | double b[len][len];
|
|---|
| 14 |
|
|---|
| 15 | for (i=0; i<n; i++)
|
|---|
| 16 | for (j=0; j<m; j++)
|
|---|
| 17 | b[i][j] = 0.5;
|
|---|
| 18 |
|
|---|
| 19 | #pragma omp parallel for
|
|---|
| 20 | for (i=1;i<n;i++)
|
|---|
| 21 | for (j=1;j<m;j++)
|
|---|
| 22 | b[i][j]=b[i-1][j-1];
|
|---|
| 23 |
|
|---|
| 24 | return 0;
|
|---|
| 25 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.