next up previous contents
Next: The SERIAL Model Up: The LOCAL Model Previous: LOCAL Calling Sequence

Information Available to the Local Procedure

 

The local procedure invoked on each processor is passed a local argument for each global argument passed by the caller to the (global) extrinsic procedure interface. Each global argument is an HPF array or scalar. The corresponding local argument is the part of the global array stored locally, or a local copy of a scalar argument or sequential array replicated across processors. Note that if the HPF array is replicated, each local procedure receives a copy of the entire actual. An array actual argument passed by an HPF caller is called a global array; the subgrid of that global array passed to one copy of a local routine (because it resides in that processor) is called a local array.

If the extrinsic procedure is a function, then the local procedure is also a function. Only scalar-valued extrinsic functions are allowed. All local functions must return the same value.

If a global HPF program calls local subprogram A with an actual array argument X, and A receives a portion of array X as dummy argument P, then A may call another local subprogram B and pass P or a section of P as an actual argument to B.

The run-time interface must provide enough information that each local function can discover for each local argument the mapping of the corresponding global argument, translate global indices to local indices, and vice-versa. A specific set of procedures that provide this information is listed in the HPF Local Library Section 11.7.1. The manner in which this information is made available to the local routine depends on the implementation and the programming language used for the local routine.