next up previous contents
Next: Effect and Restrictions Up: The Java Adlib API Previous: Effect and Restrictions   Contents

Gather

A gather() operation is a communication schedule for collecting an arbitrary set of values from one distributed array (the source array) into the elements of another (the destination array). The selected set of elements is defined by a vector of subscript arrays, with an optional mask array. General signatures of the gather() function are

$\displaystyle \begin{minipage}[t]{\linewidth}\small\begin{tabbing}
\verb$ void ...
...subscripts0, int  ...

and

$\displaystyle \begin{minipage}[t]{\linewidth}\small\begin{tabbing}
\verb$ void...
...int  ...

where the variable $ T$ runs over all primitive types and Object, and the notation $ T$ # means a multiarray of arbitrary rank, with elements of type $ T$. Currently the highest rank of source array with a gather() method is 3. The source and destination arrays can have different ranks. But the destination and subscript arrays are all the same shape, and all are aligned with one another. The number of subscript array arguments is equal to the rank of the source array. The second set of signatures take an extra boolean array aligned with the subscript array. Assignment to a destination element is conditional on the value of the element of the mask associated with the subscripts. The gather method is implemented by a schedule object with HPspmd class Gather$ T$. Each primitive type and Object has its own schedule class. This class has six constructors with arguments identical to the method above, and has one public method with no arguments called execute(), which executes the schedule. The effective public interface of the Gather$ T$ class is

$\displaystyle \begin{minipage}[t]{\linewidth}\small\verb$ public class Gather$$...
...ublic void execute () { ... }$\\
\verb$ . . .$\\
\verb$ }$
\end{minipage}
$



Subsections
next up previous contents
Next: Effect and Restrictions Up: The Java Adlib API Previous: Effect and Restrictions   Contents
Bryan Carpenter 2004-06-09