Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

IALL

Transformational Intrinsic Function (Generic): Reduces an array with a bitwise AND operation.

result = IALL (array, dim [, mask])

result = IALL (array [, mask])

array

(Input) Must be an array of type integer.

dim

(Input) Must be a scalar integer with a value in the range 1 <= dim <= n, where n is the rank of array.

mask

(Input; optional) Must be of type logical and conformable with array.

Results

The result has the same type and kind parameters as array. It is scalar if dim does not appear 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.

If array has size zero the result value is equal to NOT (INT (0, KIND (array))). Otherwise, the result of IALL (array) has a value equal to the bitwise AND of all the elements of array.

The result of IALL (array, MASK=mask) has a value equal to IALL (PACK (array, mask)).

The result of IALL (array, DIM=dim [ , MASK=mask]) has a value equal to that of IALL (array [ , MASK=mask]) if array has rank one. Otherwise, the value of element (s1, s2, ..., sdim-1, sdim+1 , ..., sn) of the result is equal to IALL (array (s1, s2, ..., sdim-1 , :, sdim+1 , ..., sn) [, MASK = mask (s1, s2, ..., sdim-1 , :, sdim+1 , ..., sn)]).

Example

IALL ([14, 13, 11]) has the value 8. IALL ([14, 13, 11], MASK=[.true., .false., .true]) has the value 10.

See Also