Next: Requirements on the Up: Extrinsic Procedures Previous: Overview

Definition and Invocation of Extrinsic Procedures

index.html

The extrinsic-kind-keyword indicates the kind of extrinsic interface to be used. (It may be helpful to think of this name as being to the subprogram calling interface what a KIND parameter is for a numeric type. However, an extrinsic-kind is not integer-valued; it is merely a keyword.) HPF defines three such keywords: HPF$, HPF_LOCAL, and HPF_SERIAL. The keyword HPF_LOCAL is intended for use in calling routines coded in the ``local HPF'' style described in Annex . The keyword HPF$ refers to the interface normally used for calling ordinary HPF routines.

index.html

index.html

A subprogram with an extrinsic interface lies outside the scope of HPF. However, explicit interfaces to such subprograms must conform to HPF. Note that any particular HPF implementation is free to support any selection of extrinsic kind keywords, or none at all except for HPF$ itself. Examples:

INTERFACE EXTRINSIC(HPF_LOCAL) FUNCTION BAGEL(X) REAL X(:) REAL BAGEL(100) !HPF$ ALIGN WITH X :: Y, Z !HPF$ DISTRIBUTE (BLOCK, BLOCK) X END FUNCTION END INTERFACE INTERFACE KNISH

FUNCTION RKNISH(X) !normal HPF interface REAL X(:), RKNISH END RKNISH

EXTRINSIC(SISAL) FUNCTION CKNISH(X) !extrinsic interface COMPLEX X(:), CKNISH END CKNISH

END INTERFACE In the last interface block, two external procedures, one of them extrinsic and one not, are associated with the same generic procedure name, which returns a scalar of the same type as its array argument.

The intent is that a call to an extrinsic subprogram behaves, as observed by a calling program coded in HPF, exactly as if the subprogram has been coded in HPF.

index.html

index.html

index.html



Next: Requirements on the Up: Extrinsic Procedures Previous: Overview


paula@erc.msstate.edu
Thu Dec 8 16:17:11 CST 1994