2022-04-18 15:02:25 -07:00

15 lines
449 B
TeX

\pagebreak
\section{\code{parallel} Construct}
\label{sec:parallel}
\index{constructs!parallel@\code{parallel}}
\index{parallel construct@\code{parallel} construct}
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}