next up previous contents
Next: C Language Bindings Up: HPF Bindings Previous: Argument Association

Special Considerations for HPF_SERIAL

There are restrictions that apply to an HPF_SERIAL subprogram.

No specification-directive, realign-directive, or redistribute-directive is permitted to be appear in an HPF_SERIAL subprogram or interface body.

Any dummy data objects and any function result variables of an HPF_SERIAL procedure will be considered to be sequential.

An HPF_SERIAL subprogram must not contain a definition of a common block that has the same name as a common block defined in an HPF or HPF_LOCAL program unit. In addition, an HPF_SERIAL subprogram must not contain a definition of the blank common block if an HPF or HPF_LOCAL program unit has a definition of the blank common block.

A dummy argument or function result variable of an HPF_SERIAL procedure that is referenced in global HPF must not have the POINTER attribute. A subobject of a dummy argument or function result of an HPF_SERIAL procedure that is referenced in global HPF, must not have the POINTER attribute.

A dummy argument of an HPF_SERIAL procedure that is referenced in global HPF and any subobject of such a dummy argument must not have the TARGET attribute.

A dummy procedure argument of an HPF_SERIAL procedure must be an HPF_SERIAL procedure.

      PROGRAM MY_TEST
        INTERFACE
          EXTRINSIC('HPF','SERIAL') SUBROUTINE GRAPH_DISPLAY(DATA)
            INTEGER, INTENT(IN) :: DATA(:, :)
          END SUBROUTINE GRAPH_DISPLAY
        END INTERFACE

        INTEGER, PARAMETER :: X_SIZE = 1024, Y_SIZE = 1024

        INTEGER DATA_ARRAY(X_SIZE, Y_SIZE)
!HPF$   DISTRIBUTE DATA_ARRAY(BLOCK, BLOCK)

!  Compute DATA_ARRAY
        ...
        CALL DISPLAY_DATA(DATA_ARRAY)
      END PROGRAM MY_TEST

! The definition of a graphical display subroutine.
! In some implementation-dependent fashion,
! this will plot a graph of the data in DATA.

      EXTRINSIC('HPF','SERIAL') SUBROUTINE GRAPH_DISPLAY(DATA)
        INTEGER, INTENT(IN) :: DATA(:, :)
        INTEGER :: X_IDX, Y_IDX

        DO Y_IDX = LBOUND(DATA, 2), UBOUND(DATA, 2)
          DO X_IDX = LBOUND(DATA, 1), UBOUND(DATA, 1)
          ...
          END DO
        END DO
      END SUBROUTINE GRAPH_DISPLAY


next up previous contents
Next: C Language Bindings Up: HPF Bindings Previous: Argument Association