Mercurial > mxe-octave
comparison src/libgomp-test.c @ 988:e55bb62b2970
improved test programs of packages libgomp and pthreads
author | Volker Grabsch <vog@notjusthosting.com> |
---|---|
date | Wed, 19 May 2010 23:50:39 +0200 |
parents | 35a9e556c82c |
children | f653602a0500 |
comparison
equal
deleted
inserted
replaced
987:77ef614fd370 | 988:e55bb62b2970 |
---|---|
7 int main(int argc, char *argv[]) | 7 int main(int argc, char *argv[]) |
8 { | 8 { |
9 (void)argc; | 9 (void)argc; |
10 (void)argv; | 10 (void)argv; |
11 | 11 |
12 omp_set_num_threads(4); | |
13 | |
12 #pragma omp parallel | 14 #pragma omp parallel |
13 printf("Hello from thread %d, nthreads %d\n", | 15 fprintf(stderr, "Hello from thread %d, nthreads %d\n", |
14 omp_get_thread_num(), omp_get_num_threads()); | 16 omp_get_thread_num(), omp_get_num_threads()); |
15 | 17 |
16 return 0; | 18 return 0; |
17 } | 19 } |