Next: , Previous: Implementing ORDERED construct, Up: The libgomp ABI


9.13 Implementing SECTIONS construct

A block as

       #pragma omp sections
       {
         #pragma omp section
         stmt1;
         #pragma omp section
         stmt2;
         #pragma omp section
         stmt3;
       }

becomes

       for (i = GOMP_sections_start (3); i != 0; i = GOMP_sections_next ())
         switch (i)
           {
           case 1:
             stmt1;
             break;
           case 2:
             stmt2;
             break;
           case 3:
             stmt3;
             break;
           }
       GOMP_barrier ();