2024-04-16 08:59:23 -07:00

15 lines
456 B
TeX

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