#pragma omp | directive-name | [clause, ...] | newline |
---|---|---|---|
Required for all OpenMP C/C++ directives. | A valid OpenMP directive must appear after the pragma and before any clauses. | Optional. Clauses can be in any order, and repeated as necessary unless otherwise restricted. | Required. Precedes the structured block which is enclosed by this directive. |
#pragma omp parallel default(shared) private(beta,pi)
Case sensitive.
Directives follow conventions of the C/C++ standards for compiler directives.
Only one directive-name may be specified per directive.
Each directive applies to at most one succeeding statement, which must be a structured block.
Long directive lines can be “continued” on succeeding lines by escaping the newline character with a backslash (“") at the end of a directive line.
#pragma omp <directive>
[ structured block of code ]