#pragma omp parallel for

Purpose

The omp parallel for directive effectively combines the omp parallel and omp for directives. This directive lets you define a parallel region containing a single for directive in one step.

Syntax

Read syntax diagramSkip visual syntax diagram
                                .-+---+------.             
                                | '-,-'      |             
                                V            |             
>>-#--pragma--omp parallel for----+--------+-+--for-loop-------><
                                  '-clause-'               

Usage

With the exception of the nowait clause, clauses and restrictions described in the omp parallel and omp for directives also apply to the omp parallel for directive.