annotate src/libgomp-test.c @ 7220:d3087afece14 default tip @

* src/gdal.mk, src/xcb.mk: disable doxygen docs
author John Donoghue <john.donoghue@ieee.org>
date Wed, 22 May 2024 10:31:54 -0400
parents 99516e73b368
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 }