Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <omp.h>
- int main() {
- #pragma omp parallel
- {
- #pragma omp single
- {
- printf("*single1* Thread #%d\n", omp_get_thread_num());
- }
- printf("*intermediate Thread #%d\n", omp_get_thread_num());
- #pragma omp single
- {
- printf("*single2* Thread #%d\n", omp_get_thread_num());
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment