Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 73da93ad authored by thierry's avatar thierry
Browse files

Update

parent e5d0c517
No related branches found
No related tags found
No related merge requests found
#include <iostream>
#include <omp.h>
int main(int argc, char** argv)
{
#pragma omp parallel num_threads(3)
{
#pragma omp master
/* static scheduler with chunk_size == 1 */
for (int i=0; i<16; ++i)
{
#pragma omp task
{
#pragma omp critical
std::cout << omp_get_thread_num() << ":: do iteration " << i << std::endl;
}
}
#pragma omp taskwait
}
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment