source:
CIVL/mods/dev.civl.com/examples/omp/simplifier/arrayReshape2-yes.c@
8553be8
| Last change on this file since 8553be8 was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 217 bytes | |
| Rev | Line | |
|---|---|---|
| [c5f07b7] | 1 | void f(double *a, double (*b)[10]) { |
| 2 | #pragma omp parallel for private(a, b) | |
| 3 | for (int i = 0; i < 9; i++) { | |
| 4 | a[i] = b[i][i]; | |
| 5 | } | |
| 6 | } | |
| 7 | ||
| 8 | int main() { | |
| 9 | double A[10][10] = {0}; | |
| 10 | double *p; | |
| 11 | ||
| 12 | p = &A[0][1]; | |
| 13 | f(p, A); | |
| 14 | } |
Note:
See TracBrowser
for help on using the repository browser.
