\section{Array Shaping} \label{sec:array-shaping} \ccppspecificstart A pointer variable can be shaped to a multi-dimensional array to facilitate data access. This is achieved by a \plc{shape-operator} casted in front of a pointer (lvalue expression): \begin{description} \item[]\hspace*{5mm}\code{([$s_1$][$s_2$]...[$s_n$])}\plc{pointer} \end{description} where each $s_i$ is an integral-type expression of positive value. The shape-operator can appear in either the \plc{motion-clause} of the \code{target}~\code{update} directive or the \code{depend} clause. The following example shows the use of the shape-operator in the \code{target}~\code{update} directive. The shape-operator \code{([nx][ny+2])} casts pointer variable $a$ to a 2-dimentional array of size \plc{nx}$\times$\plc{(ny+2)}. The resulting array is then accessed as array sections (such as \code{[0:nx][1]} and \code{[0:nx][ny]}) in the \code{from} or \code{to} clause for transferring two columns of noncontiguous boundary data from or to the device. Note the use of additional parentheses around the shape-operator and $a$ to ensure the correct precedence over array-section operations. \cnexample[5.0]{array_shaping}{1} \ccppspecificend The shape operator is not defined for Fortran. Explicit array shaping of procedure arguments can be used instead to achieve a similar goal. Below is the Fortran-equivalent of the above example that illustrates the support of transferring two rows of noncontiguous boundary data in the \code{target}~\code{update} directive. \ffreeexample[5.0]{array_shaping}{1}