Next: Translating array sections
Up: Basic translation
Previous: Distributed array creation without
Contents
Index
Translating element access
We only need to consider the case where the array reference is a multiarray.
The general scheme is illustrated in Figure A.26.
The macro OFFSET is defined as
There are three cases for the macro OFFSET_DIM depending on
whether the subscript argument is an integer subscripts (in a
sequential dimension), a distributed index, or a shifted index.
If is an integer expression (which implies
that has type SeqArrayDim), then
The fields off_bas and off_stp are initialized
by the constructors for SeqArrayDim. They do not exist
in the superclass ArrayDim.
Otherwise, if is a distributed index , then
where
is the local subscript variable for
this index (see sections A.4.6
and A.4.7).
Otherwise, if is a shifted index , then
where
is the local
subscript variable and
is the shift step variable for
(again, see sections A.4.6 and A.4.7).
Figure A.27:
Translation of array section with no scalar subscripts.
SOURCE:
TRANSLATION:
where:

Next: Translating array sections
Up: Basic translation
Previous: Distributed array creation without
Contents
Index
Bryan Carpenter
20030415