source:
CIVL/examples/omp/region1.c@
0a5fb11
| Last change on this file since 0a5fb11 was fd42b02, checked in by , 11 years ago | |
|---|---|
|
|
| File size: 200 bytes | |
| Line | |
|---|---|
| 1 | #include <omp.h> |
| 2 | #define N 10 |
| 3 | |
| 4 | int main (int argc, char * argv[]){ |
| 5 | int i; |
| 6 | int a[N]; |
| 7 | |
| 8 | #pragma omp parallel |
| 9 | { |
| 10 | int max = N; |
| 11 | |
| 12 | #pragma omp for |
| 13 | for(i=0; i<max; i++) |
| 14 | a[i] = 0; |
| 15 | |
| 16 | max = 0; |
| 17 | } |
| 18 | } |
Note:
See TracBrowser
for help on using the repository browser.
