Debian Codegraph @

vendored-meson/meson/test cases/common/184 openmp/main.cpp

raw
1 #include <iostream>
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 std::cout << "Max threads is " << omp_get_max_threads() << " not 2." << std::endl;
10 return 1;
11 }
12 #else
13 printf("_OPENMP is not defined; is OpenMP compilation working?\n");
14 return 1;
15 #endif
16 }