next up previous contents
Next: Library Access from Serial Up: HPF Local Routine Library Previous: LOCAL_UINDEX(ARRAYDIM, PROC)

LOCAL_UINDEX(ARRAY, DIM, PROC)

Optional argument. PROC.

Description. Returns the highest local index of all blocks of an array dummy argument in a given dimension on a processor.

Class. Pure function.

Arguments.

ARRAY may be of any type; it must be a dummy array that is associated with a global HPF array actual argument.

DIM must be scalar and of type integer with a value in the range 1 < DIM < n, where n is the rank of ARRAY.

PROC (optional) must be scalar and of type integer. It must be a valid processor number.

Result Type, Type Parameter, and Shape. The result is a rank-one array of type default integer and size b, where b is the value returned by LOCAL_BLKCNT(ARRAY, DIM [, PROC])

Result Value.

Case (i): The value of LOCAL_UINDEX(ARRAY, DIM, PROC) has a value whose ith component is the local index of the last element of the block in dimension DIM of ARRAY on processor PROC. The value of the ith element will be in the range 1 to ei, where ei is the extent of the ith dimension of ARRAY.

Case (ii): LOCAL_UINDEX(ARRAY, DIM) returns the same value as
LOCAL_UINDEX(ARRAY, DIM, PROC=MY_PROCESSOR()).


Examples. With the same declarations as in the example under LOCAL_BLKCNT, on the physical processor corresponding to PR(2,4) the value returned by
LOCAL_UINDEX(X, DIM=1) is [1 2 3 4]; the value of LOCAL_UINDEX(X, DIM=2) is [2 3 4].