diff options
Diffstat (limited to 'meson/test cases/common/184 openmp/main.c')
-rw-r--r-- | meson/test cases/common/184 openmp/main.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/meson/test cases/common/184 openmp/main.c b/meson/test cases/common/184 openmp/main.c new file mode 100644 index 000000000..cc81f4897 --- /dev/null +++ b/meson/test cases/common/184 openmp/main.c @@ -0,0 +1,16 @@ +#include <stdio.h> +#include <omp.h> + +int main(void) { +#ifdef _OPENMP + if (omp_get_max_threads() == 2) { + return 0; + } else { + printf("Max threads is %d not 2.\n", omp_get_max_threads()); + return 1; + } +#else + printf("_OPENMP is not defined; is OpenMP compilation working?\n"); + return 1; +#endif +} |