next up previous contents index
Next: Scalar subscripts in distributed Up: Translating array sections Previous: Translating array sections   Contents   Index

Scalar subscripts in sequential dimensions

To handle the case where scalar subscripts may appear in sequential dimensions (Figure A.28) we must add one new case for the definition of the macro PROCESS_SUBSCRIPTS.

If $\mbox{\it subs}_s$ is an integer expression, a distributed index, or a shifted indexA.6, and the $s$th dimension of $a$ is sequential, then

\begin{displaymath}
\begin{minipage}[t]{\linewidth}\begin{tabbing}
$\mbox{\it PR...
...UBSCRIPTS}\left(v, r, a, s+1\right)$\end{tabbing}\end{minipage}\end{displaymath}

where the macro OFFSET_DIM is defined in section A.4.12.

Figure A.29: Translation of array section allowing scalar subscripts in distributed dimensions.

SOURCE:

\begin{displaymath}
\begin{minipage}[t]{\linewidth}\begin{tabbing}
$v$\verb$ = $...
... $\mbox{\it subs}_{R-1}$\verb$]] ;$
\end{tabbing}\end{minipage}\end{displaymath}

TRANSLATION:


\begin{displaymath}
\begin{minipage}[t]{\linewidth}\begin{tabbing}
\verb$int $$b...
...Base($$p$\verb$, $$b$\verb$) ;$ \\
\end{tabbing}\end{minipage}\end{displaymath}

where:

\begin{displaymath}
\begin{array}{l}
\mbox{The expression $v$ is the assigned a...
... {\it PROCESS\_SUBSCRIPTS} is defined in the text.}
\end{array}\end{displaymath}



Bryan Carpenter 2003-04-15