Next: Creating distributed arrays
Up: Basic translation
Previous: Translating assignment expressions
Contents
Index
Translating multiarray creation
The pre-translator ensures that multiarray creation only
appears on the right-hand-side of a top-level assignment, so we
only need to consider that case.
The scheme for the translation in non-HPspmd code
is illustrated in
Figure A.23.
In this case we must be creating a sequential multiarray and
all extent expressions must be integers.
The macro DEFINE_DIMENSION is defined as follows:
As each dimension is processed,
the memory stride for the next dimension is computed by multiplying the
variable
by the extent of the current
dimension. The final value of
is the total number of locally held
elements.
Figure A.24:
Translation of multiarray creation with on clause.
SOURCE:
TRANSLATION:
where:
|
Subsections
Next: Creating distributed arrays
Up: Basic translation
Previous: Translating assignment expressions
Contents
Index
Bryan Carpenter
2003-04-15