190
edits
Changes
→Case A - Using the Thread window
The Thread Window shows Thread list with the detailed information in your application, You can filter thread list and see the particular information.
[[File:thread_windowthread_window2.png|1000px|center|Thread window2window]]
#include <iostream>
#include <omp.h>
using namespace std;
int main()
{ // ***serial*** printf("current using num of default usable thread is %d \n\n", omp_get_num_threadsomp_get_max_threads()); // serial ver printf("usable num of thread currently using is %d \n", omp_get_max_threadsomp_get_num_threads());
{
#pragma omp single // set openMP ver { // ***openMP*** printf("current using num of thread currently using is %d \n", omp_get_num_threads()); printf("usable num of thread is %d \n", omp_get_max_threads());
}
printf("working thread num is %d \n", omp_get_thread_num());
}
}
printf("working thread num is %d \n", omp_get_thread_num());
}
printf("\n");
return 0;
}