diff options
Diffstat (limited to 'final/runtime/test/api/has_openmp.c')
-rw-r--r-- | final/runtime/test/api/has_openmp.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/final/runtime/test/api/has_openmp.c b/final/runtime/test/api/has_openmp.c new file mode 100644 index 0000000..da95f59 --- /dev/null +++ b/final/runtime/test/api/has_openmp.c @@ -0,0 +1,23 @@ +// RUN: %libomp-compile-and-run +#include <stdio.h> +#include <stdlib.h> +#include "omp_testsuite.h" + +int test_has_openmp() +{ + int rvalue = 0; +#ifdef _OPENMP + rvalue = 1; +#endif + return (rvalue); +} + +int main() +{ + int i; + int num_failed=0; + if(!test_has_openmp()) { + num_failed++; + } + return num_failed; +} |