next up previous contents
Next: Maxval Up: ProductDim Previous: ProductDim   Contents

Effect and Restrictions

Effect:
On exit, if mask is not present, the value of


  res [
$ x_0, \ldots , x_{\mbox{\tt dim-1}}, x_{\mbox{\tt dim+1}}, \ldots , x_{R - 1}$]
is

$\displaystyle \prod_{x_{\mbox{\scriptsize\tt dim}} = 0}^{N - 1} \mbox{\tt sourc...
...}}, x_{\mbox{\tt dim}}, x_{\mbox{\tt dim+1}},
\ldots, x_{R - 1} \mbox{\tt ]}
$

where $ N$ is the extent of the source array in dimension dim. The product is performed in an unspecified order. If mask is present, the exit value is

$\displaystyle \prod_{\begin{array}{c}
x_{\mbox{\scriptsize\tt dim}} = 0 \\
\...
...}}, x_{\mbox{\tt dim}}, x_{\mbox{\tt dim+1}},
\ldots, x_{R - 1} \mbox{\tt ]}
$

It has same effect as without the mask if all values of the mask are true. If all elements of the mask are false, res will store one. As implied by the replicated alignment of the result array, results are broadcast in the process dimension associated with dimension dim of the source array.
Value restrictions:
The value of dimension must be in the range 0, ...,$ R$-1 where $ R$ is the rank of the source array.
Shape restrictions:
The mask array if present must have the same shape as the source array. The shape of the result array must be obtained from the shape of the source array be deleting dimension dimension.
Alignment restrictions:
The mask array if present must be aligned with the source array. The result array must be aligned to the source array, with replicated alignment in dimension dimension.
Containment restrictions:
The source array, mask array if present, and the result array must be fully contained in the active progess group.
Overlap restrictions:
In-place updates are not allowed.
Replicated data:
If the source array or mask array if present has replicated mapping, values for particular elements are generally taken from the nearest copy. The definition of ``nearest'' is implementation dependent. Consistent replication of copies in the result array relies on consistency of copies in the source array.

next up previous contents
Next: Maxval Up: ProductDim Previous: ProductDim   Contents
Bryan Carpenter 2004-06-09