annotate src/libgomp-test.c @ 2333:f653602a0500

Rebrand to new project name MXE
author Volker Grabsch <vog@notjusthosting.com>
date Wed, 28 Mar 2012 15:46:58 +0200
parents e55bb62b2970
children 8a6c466753e2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2333
f653602a0500 Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents: 988
diff changeset
1 /* This file is part of MXE. */
945
5d47a5e4b43a add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
2 /* See doc/index.html for further information. */
5d47a5e4b43a add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
3
5d47a5e4b43a add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
4 #include <omp.h>
5d47a5e4b43a add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
5 #include <stdio.h>
5d47a5e4b43a add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
6
946
35a9e556c82c improved coding style of test programs
Volker Grabsch <vog@notjusthosting.com>
parents: 945
diff changeset
7 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
8 {
5d47a5e4b43a add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
9 (void)argc;
5d47a5e4b43a add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
10 (void)argv;
5d47a5e4b43a add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
11
988
e55bb62b2970 improved test programs of packages libgomp and pthreads
Volker Grabsch <vog@notjusthosting.com>
parents: 946
diff changeset
12 omp_set_num_threads(4);
e55bb62b2970 improved test programs of packages libgomp and pthreads
Volker Grabsch <vog@notjusthosting.com>
parents: 946
diff changeset
13
945
5d47a5e4b43a add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
14 #pragma omp parallel
988
e55bb62b2970 improved test programs of packages libgomp and pthreads
Volker Grabsch <vog@notjusthosting.com>
parents: 946
diff changeset
15 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
16 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
17
5d47a5e4b43a add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
18 return 0;
5d47a5e4b43a add test program for package libgomp (by Tony Theodore)
Volker Grabsch <vog@notjusthosting.com>
parents:
diff changeset
19 }