next up previous contents index
Next: An extended example: prefix Up: Low level SPMD programming Previous: Reduction to Java arrays   Contents   Index

Local arrays

We have seen two complementary ways the HPJava language provides to access the local part of a distributed array--through the dimension splitting syntax, and through the dat() inquiry.

Neither of these return exactly what one might originally have expected--a local sequental array containing exactly the local elements of the distributed array--no more and no less.

We refrained from complicating the language definition with this functionality, because it can be implemented using a library function. For example, for a two dimensional array of float the following procedure would do the job:

...bas : c_sub_top : c.sub_stp]] ;

Note that this is an incoherent function. The result array could not, for example, be passed as an argument to a collective method.

Bryan Carpenter 2003-04-15