This topic has not yet been rated - Rate this topic

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();
}
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ