#pragma omp ordered
Purpose
The omp ordered directive identifies a structured block of code that must be executed in sequential order.
Usage
The omp ordered directive must be used as follows:
- It must appear within the extent of a omp for or omp parallel for construct containing an ordered clause.
- It applies to the statement block immediately following it. Statements in that block are executed in the same order in which iterations are executed in a sequential loop.
- An iteration of a loop must not execute the same omp ordered directive more than once.
- An iteration of a loop must not execute more than one distinct omp ordered directive.