HPJava provides array section of global arrays. The syntax of section subscripting a global array is similar to its definition, a double bracket is used. The subscripts can be locations or ranges.
Suppose we still have array c defined as above, then, c, c[[i, y[1::2]]], c[[i, z]] and b[[i]] are all array sections. Here i is a location in the first range of b and c, and z is a subrange of the second range of c.
Expression c[[i, y[1::2]]] and c[[i, z]] represent a one-dimensional distributed array, providing an alias for a subset of elements of c. Expression b[[i]] contains a single element of b, yet the result is a global scalar reference, not a simple variable.
Array section expression will be used as arguments in function calls. Table 1 shows the type relations of global data with different dimensions.
Table 1: Section expression and type signature
In the table, both i and j are location references.