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

LOCAL_LINDEX(ARRAY, DIM, PROC)

Optional argument. PROC.

Description. Returns the lowest 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_LINDEX(ARRAY, DIM, PROC) has a value whose component is the local index of the first element of the block in dimension DIM of ARRAY on processor PROC. The value of the element will be in the range 1 to , where is the extent of the dimension of ARRAY.

Case (ii): LOCAL_LINDEX(ARRAY, DIM) returns the same value as
LOCAL_LINDEX(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_LINDEX(X, DIM=1) is [1 2 3 4]; the value of LOCAL_LINDEX(X, DIM=2) is [1 3 4].