Resolves dependencies to facilitate auto-parallelization of the immediately following loop (parallel) or prevents auto-parallelization of the immediately following loop (noparallel).
- Can be any of the following:
- always [assert]
- Overrides compiler heuristics that estimate whether parallelizing a loop would increase performance. Using this clause on a loop that the compiler finds to be parallelizable tells the compiler to parallelize the loop even if doing so might not improve performance.Ifassertis added, the compiler will generate an error-level assertion test to display a message saying that the compiler efficiency heuristics indicate that the loop cannot be vectorized.
- firstprivate(var[ :expr] ... )text
- Provides a superset of the functionality provided by theprivateclause. Variables that appear in afirstprivatelist are subject toprivateclause semantics. In addition, its initial value is broadcast to all private instances upon entering the parallel loop.
- lastprivate(var[ :expr] ... )
- Provides a superset of the functionality provided by theprivateclause. Variables that appear in alastprivatelist are subject to private clause semantics. In addition, when the parallel region is exited, each variable has the value that results from the sequentially last iteration of the loop up exiting the parallel loop.
- Parallelizes the loop acrossnthreads, wherenis an integer.
- private(var[ :expr] ...)