A.8 Specifying Parallel Sections

In the following example, (for Section 2.4.2 on page 14) functions xaxis, yaxis, and zaxis can be executed concurrently. The first section directive is optional. Note that all section directives need to appear in the lexical extent of the parallelsections construct.

#pragma omp parallel sections
{
    #pragma omp section
        xaxis();
    #pragma omp section
        yaxis();
    #pragma omp section
        zaxis();
}