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

MinlocDim

A minlocDim() method is a reduction operation for searching for the smallest elements of a distributed array along one of its dimensions, yielding a reduced array with the rank one less than the source. It has two prototypes

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

and

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

where the variable $ t$ runs over all primitive types other than boolean, and the notation $ t$ # means a multiarray of arbitrary rank, with elements of type $ t$. The result of this operation is written in res and location is written in loc. The array loc has the same rank and alignment as res (since the reduction is in a single dimension, only one index value--for the specified dimension--meeds to be returned per extreme value). The reduction occurs in dimension dimension. The second form takes an extra boolean array aligned with the source array and ignores all elements of source for which the corresponding element of mask is false. The minlocDim method is implemented by a schedule object with HPspmd class MinlocDim$ t$. Each primitive types other than boolean has its own schedule class. This class has two 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 MinlocDim$ t$ class is

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

The source array is source and the array of maximum values is res. They will both have elements of type $ t$. The array of maximum locations is loc. The reduction occurs in dimension dimension. The mask array is mask.

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