mirror of
https://github.com/OpenMP/Examples.git
synced 2025-04-07 15:12:11 +01:00
15 lines
456 B
TeX
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}
|
|
|