Mercurial > mxe-octave
annotate src/libgomp-test.c @ 3700:76745b5dfd81
bump version to 0.0.31
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 28 Aug 2014 16:58:58 -0400 |
parents | 99516e73b368 |
children |
rev | line source |
---|---|
2351
8a6c466753e2
Improve comment style of all test programs
Volker Grabsch <vog@notjusthosting.com>
parents:
2333
diff
changeset
|
1 /* |
8a6c466753e2
Improve comment style of all test programs
Volker Grabsch <vog@notjusthosting.com>
parents:
2333
diff
changeset
|
2 * This file is part of MXE. |
2353
99516e73b368
Move doc/index.html -> index.html
Volker Grabsch <vog@notjusthosting.com>
parents:
2351
diff
changeset
|
3 * See index.html for further information. |
2351
8a6c466753e2
Improve comment style of all test programs
Volker Grabsch <vog@notjusthosting.com>
parents:
2333
diff
changeset
|
4 */ |
945
5d47a5e4b43a
add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
5 |
5d47a5e4b43a
add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
6 #include <omp.h> |
5d47a5e4b43a
add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
7 #include <stdio.h> |
5d47a5e4b43a
add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
8 |
946
35a9e556c82c
improved coding style of test programs
Volker Grabsch <vog@notjusthosting.com>
parents:
945
diff
changeset
|
9 int main(int argc, char *argv[]) |
945
5d47a5e4b43a
add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
10 { |
5d47a5e4b43a
add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
11 (void)argc; |
5d47a5e4b43a
add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
12 (void)argv; |
5d47a5e4b43a
add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
13 |
988
e55bb62b2970
improved test programs of packages libgomp and pthreads
Volker Grabsch <vog@notjusthosting.com>
parents:
946
diff
changeset
|
14 omp_set_num_threads(4); |
e55bb62b2970
improved test programs of packages libgomp and pthreads
Volker Grabsch <vog@notjusthosting.com>
parents:
946
diff
changeset
|
15 |
945
5d47a5e4b43a
add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
16 #pragma omp parallel |
988
e55bb62b2970
improved test programs of packages libgomp and pthreads
Volker Grabsch <vog@notjusthosting.com>
parents:
946
diff
changeset
|
17 fprintf(stderr, "Hello from thread %d, nthreads %d\n", |
e55bb62b2970
improved test programs of packages libgomp and pthreads
Volker Grabsch <vog@notjusthosting.com>
parents:
946
diff
changeset
|
18 omp_get_thread_num(), omp_get_num_threads()); |
945
5d47a5e4b43a
add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
19 |
5d47a5e4b43a
add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
20 return 0; |
5d47a5e4b43a
add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
21 } |