b4b2e49c0bded65c584ec7d032ecd29e478480d9
9 /*----------------------------------------------------------------------*\
11 \*---------------------------------------------------------------------*/
13 /*--------------------------------------*\
15 \*-------------------------------------*/
19 cout
<< endl
<< "[HelloOMP 1]" << endl
;
22 const int NB_THREADS
= OmpTools::setAndGetNaturalGranularity();
23 cout
<< "\n[HELLO] nbThread = " << NB_THREADS
<< endl
;
27 int tid
= OmpTools::getTid();
29 //cout << "tid=" << tid << endl; // ligne couper
30 printf("tid=%i\n", tid
); //ligne non couper
36 cout
<< endl
<< "[HelloOMP 2]" << endl
;
39 const int NB_THREADS
= OmpTools::setAndGetNaturalGranularity();
40 cout
<< "\n[CBI] nbThread = " << NB_THREADS
<< endl
;
43 #pragma omp parallel for
44 for (int i
= 1; i
<= n
; i
++)
46 //cout << "HelloOMP(" << i << ")" << endl; // ligne couper
47 printf("HelloOMP(%i)\n", i
); // ligne non couper
51 /*--------------------------------------*\
53 \*-------------------------------------*/
55 /*----------------------------------------------------------------------*\
57 \*---------------------------------------------------------------------*/