diff options
| author | ruki <[email protected]> | 2020-10-12 23:06:15 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-10-12 23:06:15 +0800 |
| commit | d7c0299b40a37fcf32c3f3a0a71ec60c60e4bd07 (patch) | |
| tree | f584b11de449c19cb8fe0222814ef9297c4ad0f5 /tests/projects/openmp/loop/src | |
| parent | c79cdeab5474507647f1c29b2cb759550f98e8b6 (diff) | |
add loop tests for openmp
Diffstat (limited to 'tests/projects/openmp/loop/src')
| -rw-r--r-- | tests/projects/openmp/loop/src/main.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/projects/openmp/loop/src/main.cpp b/tests/projects/openmp/loop/src/main.cpp new file mode 100644 index 000000000..273a8538e --- /dev/null +++ b/tests/projects/openmp/loop/src/main.cpp @@ -0,0 +1,12 @@ +#include <stdio.h> +#include <omp.h> + +int main(int argc, char** argv) +{ + #pragma omp parallel for + for (int i = 0; i < 10; ++i) + { + printf("hello(%d): i = %d\n", omp_get_thread_num(), i); + } + return 0; +} |
