** Next:** Effect and Restrictions
** Up:** The Java Adlib API
** Previous:** Effect and Restrictions
** Contents**

A `minloc()` method is a reduction operation for finding the location of
the smallest elements of a distributed array. This method returns the minimum
value of all element of an array--similar to
`minval` (see section A.15--but also output the index tuple
in the array at which the extreme value was found.
The prototypical forms are
and
where the variable runs over all primitive types other than boolean,
and the notation ` #`

means a multiarray of arbitrary rank,
with elements of type . `loc` is an ordinary Java array of length
*R*, the rank of `source`.
On exit it contains the global subscripts of the extreme value.
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 `minloc` method is implemented by a schedule object with HPspmd
class `Minloc`.
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 `Minloc` class is
The source array is `source`. It will have elements of type .
The location of the largest value stored in `loc`.
Size of `loc` vector must be equal to the rank of the source array.
The mask array is `mask`.

**Subsections**

** Next:** Effect and Restrictions
** Up:** The Java Adlib API
** Previous:** Effect and Restrictions
** Contents**
Bryan Carpenter
2004-06-09