mirror of
https://github.com/OpenMP/Examples.git
synced 2025-04-23 06:11:22 +01:00
16 lines
586 B
TeX
16 lines
586 B
TeX
\pagebreak
|
|
\section{\code{loop} Construct}
|
|
\label{sec:loop}
|
|
\index{constructs!loop@\code{loop}}
|
|
\index{loop construct@\code{loop} construct}
|
|
|
|
The following example illustrates the use of the OpenMP 5.0 \code{loop}
|
|
construct for the execution of a loop.
|
|
The \code{loop} construct asserts to the compiler that the iterations
|
|
of the loop are free of data dependencies and may be executed concurrently.
|
|
It allows the compiler to use heuristics to select the parallelization scheme
|
|
and compiler-level optimizations for the concurrency.
|
|
|
|
\cexample[5.0]{loop}{1}
|
|
\ffreeexample[5.0]{loop}{1}
|