next up previous contents
Next: Practical Example of Alignment Up: Alignment Syntax Previous: Strided Alignment Example

 

Reverse Strided Alignment Example

Can reverse an array before alignment:

    REAL, DIMENSION(5)  :: D
    REAL, DIMENSION(10) :: E
!HPF$ ALIGN D(:) WITH E(UBOUND(E)::-2)

This is much the same as the previous example except that D is aligned in the reverse order. D(5) is aligned with E(10), D(4) is aligned with E(8), and so on. Effectively this says: tex2html_wrap_inline29494 i, elements E(2+UBOUND(E)-i*2) and D(i) are local.

This alignment could also be written:

!HPF$ ALIGN D(i) WITH E(2+UBOUND(E)-i*2)

See Figure 45.

   figure15796
Figure 45: Visualisation of Reverse Strided Alignment

This alignment is suitable for,

 D = D + E(10:1:-2) ! All local

Return to corresponding overview page gif


next up previous contents
Next: Practical Example of Alignment Up: Alignment Syntax Previous: Strided Alignment Example

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