mirror of
https://github.com/OpenMP/Examples.git
synced 2025-04-04 05:41:33 +01:00
19 lines
1.1 KiB
TeX
19 lines
1.1 KiB
TeX
%begin
|
|
\subsection{Asynchronous \code{target} with \code{nowait} and \code{depend} Clauses}
|
|
\label{subsec:async_target_nowait_depend}
|
|
|
|
More details on dependences can be found in \specref{sec:task_depend}, Task
|
|
Dependences. In this example, there are three flow dependences. In the first two dependences the
|
|
target task does not execute until the preceding explicit tasks have finished. These
|
|
dependences are produced by arrays \plc{v1} and \plc{v2} with the \code{out} dependence type in the first two tasks, and the \code{in} dependence type in the target task.
|
|
|
|
The last dependence is produced by array \plc{p} with the \code{out} dependence type in the target task, and the \code{in} dependence type in the last task. The last task does not execute until the target task finishes.
|
|
|
|
The \code{nowait} clause on the \code{target} construct creates a deferrable \plc{target task}, allowing the encountering task to continue execution without waiting for the completion of the \plc{target task}.
|
|
|
|
\cexample[4.5]{async_target}{4}
|
|
|
|
\ffreeexample[4.5]{async_target}{4}
|
|
|
|
%end
|