OpenMP-Examples/Examples_parallel.tex

13 lines
356 B
TeX

\pagebreak
\section{The \code{parallel} Construct}
\label{sec:parallel}
The \code{parallel} construct can be used in coarse-grain parallel programs.
In the following example, each thread in the \code{parallel} region decides what
part of the global array \plc{x} to work on, based on the thread number:
\cexample{parallel}{1}
\fexample{parallel}{1}