summaryrefslogtreecommitdiffstats
path: root/test cases/common/184 openmp/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test cases/common/184 openmp/main.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test cases/common/184 openmp/main.cpp b/test cases/common/184 openmp/main.cpp
new file mode 100644
index 0000000..b12be3f
--- /dev/null
+++ b/test cases/common/184 openmp/main.cpp
@@ -0,0 +1,16 @@
+#include <iostream>
+#include <omp.h>
+
+int main(void) {
+#ifdef _OPENMP
+ if (omp_get_max_threads() == 2) {
+ return 0;
+ } else {
+ std::cout << "Max threads is " << omp_get_max_threads() << " not 2." << std::endl;
+ return 1;
+ }
+#else
+ printf("_OPENMP is not defined; is OpenMP compilation working?\n");
+ return 1;
+#endif
+}