190
edits
Changes
→Walkthrough
==Case A==
1. set config OpenMP
2. create multiple subprojects in one projectset OpenMP
#include <iostream>
#include <stdio.h>
#include <omp.h>
using namespace std;
{
#pragma omp for single { for printf(int i = 0"current using num of thread is %d \n", omp_get_num_threads()); i < 10; i++) cout << printf(" now i at test1= usable num of thread is %d \n" << i << endl, omp_get_max_threads()); }
}
{
#pragma omp for single { for printf(int j = 0"current using num of thread is %d \n", omp_get_num_threads()); j < 10; j++) cout << printf(" now j at test2= usable num of thread is %d \n" << j << endl, omp_get_max_threads()); }
}
return 0;
}