next up previous contents index
Next: Floods. Up: Reductions and Scans Previous: Partial Scans.

Partial Reductions.

   

Partial reductions perform a reduction across some subset of dimensions, producing a lower dimensional object. For example, a partial reduction across the first dimension of a 2D array produces a vector in which each element is the sum of a elements in a row of the original array. Partial reductions require two region specifiers, one for the source expression and one for the target expression, as shown below.

[1..n,1] V := +<< [R] A;      -- reduce the second dimension of A
The region that describes the target expression is indicated by the region specifier in the usual way. The region for the source array is indicated by the region specifier that follows the scan operator.



Kay Nettle
Fri Feb 21 21:14:29 CST 1997