|
The HPJava Project |
||
|
|
|||
HPJava Home Page
PCRC Home Page
NPAC Home Page
Java Grande Home
|
SubarraysA subarray is a section of a array, typically selected by some combination of scalar and triplet subscripts.
A subarray is an object in its own right - its type is that of a suitable
multi-dimensional array. It describes some subset of the elements of
a parent array. The syntax for creating a subarray is modelled on the
Fortran syntax for creating regular sections, but the subscripts are
enclosed in double brackets. This distinguishes subarray construction
clearly from the simple subscripting operation introduced earlier. In
Subarray construction is a relatively complex operation. Besides scalar integers and triplets, allowed subscripts include locations and ranges. A location subscript must be a location in the range associated with the relevant dimension of the array, and a range subscript must be a subrange of the appropriate range of the array. By definition, integer subscript n in dimension r of array a is equivalent to location subscript a.rng(r)[n], and triplet subscript l:u:s is equivalent to range subscript a.rng(r)[l:u:s].
The mapping (distribution group and ranges) of a subarray
is determined as follows. Suppose all integer and triplet subscripts
are replaced by their equivalent location or range subscripts. If the
location subscripts are i, j, ... the distribution group of
the subarray is
We can use subranges and subarrays to give a parallel implementation
Cholesky decomposition. In pseudocode the algorithm is
The example also illustrates the use of the member
|
||