OpenMP-Examples/Examples_lastprivate.tex

15 lines
408 B
TeX

\pagebreak
\section{The \code{lastprivate} Clause}
\label{sec:lastprivate}
Correct execution sometimes depends on the value that the last iteration of a loop
assigns to a variable. Such programs must list all such variables in a \code{lastprivate}
clause so that the values of the variables are the same as when the loop is executed
sequentially.
\cexample{lastprivate}{1}
\fexample{lastprivate}{1}