OpenMP-Examples/devices/array_sections.tex
2022-04-18 15:02:25 -07:00

46 lines
1.4 KiB
TeX

\pagebreak
\section{Array Sections in Device Constructs}
\label{sec:array_sections}
\index{array sections!in map clause@in \code{map} clause}
\index{map clause@\code{map} clause}
\index{clauses!map@\code{map}}
\index{target construct@\code{target} construct}
\index{constructs!target@\code{target}}
\index{target data construct@\code{target}~\code{data} construct}
\index{constructs!target data@\code{target}~\code{data}}
The following examples show the usage of array sections in \code{map} clauses
on \code{target} and \code{target} \code{data} constructs.
This example shows the invalid usage of two separate sections of the same array
inside of a \code{target} construct.
\cexample[4.0]{array_sections}{1}
\ffreeexample[4.0]{array_sections}{1}
\pagebreak
This example shows the invalid usage of two separate sections of the same array
inside of a \code{target} construct.
\cexample[4.0]{array_sections}{2}
\ffreeexample[4.0]{array_sections}{2}
\pagebreak
This example shows the valid usage of two separate sections of the same array inside
of a \code{target} construct.
\cexample[4.0]{array_sections}{3}
\ffreeexample[4.0]{array_sections}{3}
\pagebreak
This example shows the valid usage of a wholly contained array section of an already
mapped array section inside of a \code{target} construct.
\cexample[4.0]{array_sections}{4}
\ffreeexample[4.0]{array_sections}{4}