next up previous contents
Next: HPF Intrinsics and Library Up: Extrinsics Previous: Extrinsic instead of INDEPENDENT

 

Calls to the NAG Library

It is very easy to call the NAg FORTRAN 77 library from within an F77_LOCAL extrinsic. To use tex2html_wrap_inline26277 from the NAg library:

      DOUBLE PRECISION FUNCTION Pi()
       DOUBLE PRECISION X01AAF, x
        Pi = X01AAF(x)
      END

and the calling program

PROGRAM Using_NAG_4_Pi
  !HPF$ PROCESSORS, DIMENSION(4)   :: P
  DOUBLE PRECISION, DIMENSION(100) :: A
  !HPF$ DISTRIBUTE (BLOCK) ONTO P  :: A
  INTERFACE
   EXTRINSIC(F77_LOCAL) DOUBLE PRECISION FUNCTION Pi()
   END FUNCTION Pi
  END INTERFACE
  A   = Pi()
END PROGRAM Using_NAG_4_Pi

All scalars (ie Pi) must be coherent.

For more information, click here gif


next up previous contents
Next: HPF Intrinsics and Library Up: Extrinsics Previous: Extrinsic instead of INDEPENDENT

©University of Liverpool, 1997
Wed May 28 23:37:18 BST 1997
Not for commercial use.