next up previous contents
Next: IALL_PREFIX(ARRAYDIM, MASK, SEGMENT, Up: Specifications of Library Procedures Previous: IALL(ARRAYDIM, MASK)

IALL(ARRAY, DIM, MASK)

Optional Arguments. DIM, MASK

Description. Computes a bitwise logical AND reduction along dimension DIM of ARRAY.

Class. Transformational function.

Arguments.

ARRAY must be of type integer. It must not be scalar.

DIM (optional) must be scalar and of type integer with a value in the range 1 < DIM < n, where n is the rank of ARRAY. The corresponding actual argument must not be an optional dummy argument.

MASK (optional) must be of type logical and must be conformable with ARRAY.

Result Type, Type Parameter, and Shape. The result is of type integer with the same kind type parameter as ARRAY. It is scalar if DIM is absent or if ARRAY has rank one; otherwise, the result is an array of rank n-1 and shape (d1,d2,...,dDIM-1,dDIM+1,...,dn) where(d1,d2,...dn) is the shape of ARRAY.

Result Value.

Case (i): The result of IALL(ARRAY) is the IAND reduction of all the elements of ARRAY. If ARRAY has size zero, the result is equal to a implementation-dependent integer value with the property that IAND(I, x) = I for all integers I of the same kind type parameter as ARRAY. See Section 7.4.3.

Case (ii): The result of IALL(ARRAY, MASK=MASK) is the IAND reduction of all the elements of ARRAY corresponding to the true elements of MASK; if MASK contains no true elements, the result is equal to a implementation-dependent integer value (of the same kind type parameter as ARRAY) with the property that IAND(I, x) = I for all integers I.

Case (iii): If ARRAY has rank one, IALL(ARRAY, DIM [,MASK]) has a value equal to that of IALL(ARRAY [,MASK]). Otherwise, the value of element
of IALL(ARRAY, DIM [,MASK]) is
equal to IALL(ARRAY()
[,MASK = MASK()])

Examples.

Case (i): The value of IALL((/7, 6, 3, 2/)) is 2.

Case (ii): The value of IALL(C, MASK = BTEST(C,0)) is the IAND reduction of the odd elements of C.

Case (iii):

                  /       \
If B is the array | 2 3 5 |,
                  | 3 7 7 |
                  \       /

then IALL(B, DIM = 1) is [2 3 5] and IALL(B, DIM = 2) is [0 3].


next up previous contents
Next: IALL_PREFIX(ARRAYDIM, MASK, SEGMENT, Up: Specifications of Library Procedures Previous: IALL(ARRAYDIM, MASK)