next up previous contents
Next: Extrinsic Example Up: Extrinsic Procedures Previous: Extrinsic Procedures

Language Interoperability

The EXTRINSIC keyword may be applied to a procedure name in an interface to indicate that it is non-HPF. It is up to a given compiler to support extrinsic procedures in other languages; the HPF specification does not require a compiler to support any extrinsics at all.

The following example shows how a C extrinsic may be declared. The parenthesised symbol which follows the EXTRINSIC keyword will be defined in the compiler manual and each compiler is likely to have a different notation for this keyword. Other supported keywords may be F77, FORTRAN, F77_LOCAL, PASCAL or ADA.

If an extrinsic function is called, then its interface must be given at the call site. It is very important that this interface contains all mapping directives:

  INTERFACE
   EXTRINSIC (C) SUBROUTINE Job(a)
    REAL, DIMENSION(:) :: a
    !HPF$ DISTRIBUTE a(BLOCK)
   END SUBROUTINE Job
  END INTERFACE

this would correspond to a C void function with a single array argument.

Return to corresponding overview page gif




next up previous contents
Next: Extrinsic Example Up: Extrinsic Procedures Previous: Extrinsic Procedures

©University of Liverpool, 1997
Wed May 28 20:20:27 BST 1997
Not for commercial use.