1.23
2.0
acw/focus-triggers
main
test-branch
| Rev | Line | |
|---|
| [3af26ac] | 1 | #include <civl-omp.cvh>
|
|---|
| [0495dcd] | 2 | #include <stdio.h>
|
|---|
| 3 |
|
|---|
| 4 | void main() {
|
|---|
| 5 | $omp_gteam gteam = $omp_gteam_create($here, 3);
|
|---|
| 6 |
|
|---|
| 7 | void thread(int tid) {
|
|---|
| 8 | $omp_team team = $omp_team_create($here, gteam, tid);
|
|---|
| 9 |
|
|---|
| 10 | printf("Hello from thread %d\n", tid);
|
|---|
| 11 | $omp_team_destroy(team);
|
|---|
| 12 | }
|
|---|
| 13 |
|
|---|
| 14 | $parfor (int i: ($domain){ 0 .. 2 }) {
|
|---|
| 15 | thread(i);
|
|---|
| 16 | }
|
|---|
| 17 | $omp_gteam_destroy(gteam);
|
|---|
| 18 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.