next up previous contents
Next: HPF_DISTRIBUTION(DISTRIBUTEEAXIS_TYPE,

AXIS_INFO, Up: Specifications of Extended Library Previous: HPF_ALIGNMENT(ALIGNEELB, UB, STRIDE,

HPF_ALIGNMENT(ALIGNEE, LB, UB, STRIDE, AXIS_MAP, IDENTITY_MAP, DYNAMIC, NCOPIES)

 

Optional Arguments. LB, UB, STRIDE, AXIS_MAP, IDENTITY_MAP, DYNAMIC, NCOPIES

Description. Returns information regarding the correspondence of a variable and the align-target (array or template) to which it is ultimately aligned.

Class. Mapping inquiry subroutine.

Arguments.

ALIGNEE may be of any type. It may be scalar or array valued. It must not be an assumed-size array. It must not be a pointer that is disassociated or an allocatable array that is not allocated. It is an INTENT (IN) argument.

If ALIGNEE has the pointer attribute, information about the alignment of its target is returned. The target must not be an assumed-size dummy argument or a section of an assumed-size dummy argument.

LB (optional) must be of type default integer and of rank one. Its size must be at least equal to the rank of ALIGNEE. It is an INTENT (OUT) argument. The first element of the ith axis of ALIGNEE is ultimately aligned to the LB(i)th align-target element along the axis of the align-target associated with the i axis of ALIGNEE. If the i axis of ALIGNEE is a collapsed axis, LB(i) is implementation dependent.

UB (optional) must be of type default integer and of rank one. Its size must be at least equal to the rank of ALIGNEE. It is an INTENT (OUT) argument. The last element of the ith axis of ALIGNEE is ultimately aligned to the UB(i)th align-target element along the axis of the align-target associated with the ith axis of ALIGNEE. If the ith axis of ALIGNEE is a collapsed axis, UB(i) is implementation dependent.

STRIDE (optional) must be of type default integer and of rank one. Its size must be at least equal to the rank of ALIGNEE. It is an INTENT (OUT) argument. The ith element of STRIDE is set to the stride used in aligning the elements of ALIGNEE along its ith axis. If the ith axis of ALIGNEE is a collapsed axis, STRIDE(i) is zero.

AXIS_MAP (optional) must be of type default integer and of rank one. Its size must be at least equal to the rank of ALIGNEE. It is an INTENT (OUT) argument. The ith element of AXIS_MAP is set to the align-target axis associated with the ith axis of ALIGNEE. If the ith axis of ALIGNEE is a collapsed axis, AXIS_MAP(i) is 0.

IDENTITY_MAP (optional) must be scalar and of type default logical. It is an INTENT (OUT) argument. It is set to true if the ultimate align-target associated with ALIGNEE has a shape identical to ALIGNEE, the axes are mapped using the identity permutation, and the strides are all positive (and therefore equal to 1, because of the shape constraint); otherwise it is set to false. If a variable has not appeared as an alignee in an ALIGN or REALIGN directive, and does not have the INHERIT attribute, then IDENTITY_MAP must be true; it can be true in other circumstances as well.

DYNAMIC (optional) must be scalar and of type default logical. It is an INTENT (OUT) argument. It is set to true if ALIGNEE has the DYNAMIC attribute; otherwise it is set to false.

NCOPIES (optional) must be scalar and of type default integer. It is an INTENT (OUT) argument. It is set to the number of copies of ALIGNEE that are ultimately aligned to align-target. For a non-replicated variable, it is set to one.

If ALIGNEE is scalar, then no elements of LB, UB, STRIDE, or AXIS_MAP are set.

Examples.

      REAL PI = 3.1415927
      DIMENSION A(10,10),B(20,30),C(20,40,10),D(40)
!HPF$ TEMPLATE T(40,20)
!HPF$ DYNAMIC A
!HPF$ ALIGN A(I,:) WITH T(1+3*I,2:20:2)
!HPF$ ALIGN C(I,*,J) WITH T(J,21-I)
!HPF$ ALIGN D(I) WITH T(I,4)
!HPF$ PROCESSORS PROCS(4,2), SCALARPROC
!HPF$ DISTRIBUTE T(BLOCK,BLOCK) ONTO PROCS
!HPF$ DISTRIBUTE B(CYCLIC,BLOCK) ONTO PROCS
!HPF$ DISTRIBUTE ONTO SCALARPROC :: PI

assuming that the actual mappings are as the directives specify, the results of calling HPF_ALIGNMENT are:

ABCD
LB[4,2][1,1][20,N/A,1][1]
UB[31,20][20,30][1,N/A,10][40]
STRIDE[3,2][1,1][-1,0,1][1]
AXIS_MAP[1,2][1,2][2,0,1][1]
IDENTITY_MAPfalsetruefalsefalse
DYNAMICtruefalsefalsefalse
NCOPIES1111

where "N/A" denotes a implementation-dependent result. To illustrate the use of NCOPIES, consider:

     LOGICAL BOZO(20,20),RONALD_MCDONALD(20)
!HPF$ TEMPLATE EMMETT_KELLY(100,100)
!HPF$ ALIGN RONALD_MCDONALD(I) WITH BOZO(I,*)
!HPF$ ALIGN BOZO(J,K) WITH EMMETT_KELLY(J,5*K)

Then CALL HPF_ALIGNMENT(RONALD_MCDONALD, NCOPIES = NC) sets NC to 20. Now consider:

      LOGICAL BOZO(20,20),RONALD_MCDONALD(20)
!HPF$ TEMPLATE WILLIE_WHISTLE(100)
!HPF$ ALIGN RONALD_MCDONALD(I) WITH BOZO(I,*)
!HPF$ ALIGN BOZO(J,*) WITH WILLIE_WHISTLE(5*J)

Then CALL HPF_ALIGNMENT(RONALD_MCDONALD, NCOPIES = NC) sets NC to one.


next up previous contents
Next: HPF_DISTRIBUTION(DISTRIBUTEEAXIS_TYPE,

AXIS_INFO, Up: Specifications of Extended Library Previous: HPF_ALIGNMENT(ALIGNEELB, UB, STRIDE,