next up previous
Next: Subgroup and Subrange. Up: Basic concepts Previous: Process group.

Distributed dimension and index with position.

The elements of an ordinary array can be represented by an array name and an integer sequence. Here, we have two concepts reflected by int values: an index to access each array element and a range that index can be chosen from. In describing a distributed array, we use two new built-in classes in HPJava to represent the analogous concepts:

For example,
Range x = new BlockRange(100, p.dim(0)) ;
Range y = new CyclicRange(200, p.dim(1)) ;
creates two ranges on the different process dimensions of the group p. One is block distributed, the other is cyclic distributed. There are 100 different Location items mapped by the range x from integers, for example, the first one is
Location i = x[0];


next up previous
Next: Subgroup and Subrange. Up: Basic concepts Previous: Process group.
Bryan Carpenter 2002-07-11