vendored-meson/meson/test cases/common/184 openmp/main.c
raw| 1 | #include <stdio.h> |
| 2 | #include <omp.h> |
| 3 | |
| 4 | int main(void) { |
| 5 | #ifdef _OPENMP |
| 6 | if (omp_get_max_threads() == 2) { |
| 7 | return 0; |
| 8 | } else { |
| 9 | printf("Max threads is %d not 2.\n", omp_get_max_threads()); |
| 10 | return 1; |
| 11 | } |
| 12 | #else |
| 13 | printf("_OPENMP is not defined; is OpenMP compilation working?\n"); |
| 14 | return 1; |
| 15 | #endif |
| 16 | } |