summaryrefslogtreecommitdiffstats
path: root/src/libgomp-test.c
blob: b0db0b0eaefca68704fc982d3cbd0915a4faf898 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* This file is part of mingw-cross-env.       */
/* See doc/index.html for further information. */

#include <omp.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
    (void)argc;
    (void)argv;

    omp_set_num_threads(4);

    #pragma omp parallel
    fprintf(stderr, "Hello from thread %d, nthreads %d\n",
            omp_get_thread_num(), omp_get_num_threads());

    return 0;
}