Intel® C++ Compiler 16.0 User and Reference Guide
Specifies a parallel construct that contains a single sections construct.
#pragma omp parallel sections [clause, clause, ...] |
{
#pragma omp section |
structured-block
#pragma omp section |
structured-block
...
clause |
Any clause accepted by the sections or parallel constructs. |
This pragma is a shortcut for a parallel construct that contains a single sections construct.
Example: Calculation in X, Y, and Z directions in parallel |
---|
#include <omp.h> #pragma omp parallel sections { #pragma omp section Xdirection(); #pragma omp section Ydirection(); #pragma omp section Zdirection(); } |