diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-07-31 19:22:24 +0300 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-07-31 19:22:24 +0300 |
| commit | 17bfbb99e5897ac759aca42d3ee375ebb33bd087 (patch) | |
| tree | 8df2a3f7cbfcca9c30df15404f0227dfe0107705 /test cases/common/193 openmp/main.cpp | |
| parent | 2bc0f56b21a6dd327a6907c5fe27885b05db49d5 (diff) | |
| download | meson-17bfbb99e5897ac759aca42d3ee375ebb33bd087.tar.gz | |
Condense test dirs.
Diffstat (limited to 'test cases/common/193 openmp/main.cpp')
| -rw-r--r-- | test cases/common/193 openmp/main.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test cases/common/193 openmp/main.cpp b/test cases/common/193 openmp/main.cpp new file mode 100644 index 000000000..b12be3fd8 --- /dev/null +++ b/test cases/common/193 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 +} |
