source: CIVL/examples/library/omp/teams.cvl@ 09d949f

1.23 2.0 main test-branch
Last change on this file since 09d949f was 8f2b167, checked in by Manchun Zheng <zmanchun@…>, 12 years ago

added a few more tests for omp library implementation, one of which reveals a bug related to $omp_read().

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@1589 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 370 bytes
Line 
1#include <civlc-omp.cvh>
2#include <stdio.h>
3
4void 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.