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

Scalar subscripts in distributed dimensions

The scheme for translating array sections when scalar subscripts appear in some distributed dimension is illustrated in Figure A.29.

We add two new cases for the definition of the macro PROCESS_SUBSCRIPTS. These new definitions apply only if the $s$th dimension of $a$ has the distributed attribute.

If, under these conditions, $\mbox{\it subs}_s$ is the integer expression $n$, 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 $x$ and $l$ are the names of new temporaries, $a'_s = {\bf T}_{s}\left[{a}\right]$, and $n' = {\bf T}\left[{n}\right]$. Otherwise, if $\mbox{\it subs}_s$ is a distributed index $i$ or a shifted index $i \pm d$, 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 and $\mbox{\it dim}$ is the dimension associated with $i$.

Figure A.30: Translation of a multiarray-valued field access.
\begin{figure}\par\textbf{SOURCE:}
\begin{eqnarray*}
e & \equiv & e_{\mbox{\smal...
...d \mbox{in the translated program.} \\
\end{array}\end{displaymath}\end{figure}



Bryan Carpenter 2003-04-15