#pragma omp ordered

Purpose

The omp ordered directive identifies a structured block of code that must be executed in sequential order.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-#--pragma--omp ordered--------------------------------------><

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.


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us