Export (0) Print
Expand All

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 parallel sections construct.

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

Community Additions

ADD
Show:
© 2014 Microsoft