Next: Array Reduction Intrinsics (Cont'd)
Up: Selected Intrinsic Functions
Previous: Array Location Intrinsics
- PRODUCT(SOURCE[,DIM][,MASK]) -- product of array elements
(in an optionally specified dimension under an optional mask);
- SUM(SOURCE[,DIM][,MASK]) -- sum of array elements (in an
optionally specified dimension under an optional mask).
The following 1D example demonstrates how the 11 values are reduced to
just one by the SUM reduction:
Consider this 2D example, if
-
PRODUCT(A)
is 720 -
PRODUCT(A,DIM=1)
is (/2, 12, 30/) -
PRODUCT(A,DIM=2)
is (/15, 48/)
Next: Array Reduction Intrinsics (Cont'd)
Up: Selected Intrinsic Functions
Previous: Array Location Intrinsics
©University of Liverpool, 1997
Wed May 28 23:37:18 BST 1997Not for commercial use.