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


A countDim() method is a boolean reduction operation for counting the number of true elements of a distributed array of boolean values along one of its dimensions, yielding a reduced array with the rank one less than the source. The prototype is

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

where the notation boolean # means a multiarray of arbitrary rank with elements of type boolean. The result of this operation is written in res. The reduction occurs in dimension dimension. The countDim method is implemented by a schedule object with HPspmd class CountDim. This class has a constructor 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 CountDim class is

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

The source array is source and the result array is res. They will both have elements of type boolean. The reduction occurs in dimension dimension.


Bryan Carpenter 2004-06-09