OpenMP-Examples/devices/array_sections.tex
2024-04-16 08:59:23 -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 \kcode{map} clause}
\index{map clause@\kcode{map} clause}
\index{clauses!map@\kcode{map}}
\index{target construct@\kcode{target} construct}
\index{constructs!target@\kcode{target}}
\index{target data construct@\kcode{target data} construct}
\index{constructs!target data@\kcode{target data}}
The following examples show the usage of \plc{array sections} in \kcode{map} clauses
on \kcode{target} and \kcode{target data} constructs.
This example shows the invalid usage of two separate sections of the same array
inside of a \kcode{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 \kcode{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 \kcode{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 \kcode{target} construct.
\cexample[4.0]{array_sections}{4}
\ffreeexample[4.0]{array_sections}{4}