source: CIVL/examples/omp/omp_helpers1.cvl@ 301c9b5

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since 301c9b5 was 0495dcd, checked in by Stephen Siegel <siegel@…>, 12 years ago

Adding a test for the OpenMP helper functions of civlc-omp.cvh. Currently there is a problem running it resulting in an infinite loop at an error point.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@1573 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.