next up previous contents
Next: Reverse Strided Alignment Example Up: Alignment Syntax Previous: Transposed Alignment Example

 

Strided Alignment Example

Align each element of D with every second element of E:

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

Here, D(1) is aligned with E(1), D(2) is aligned with E(3), D(3) with E(5) and so on. This form of strided alignment is specified using the subscript-triplet (or colon) notation. Effectively, this says: tex2html_wrap_inline23732 i, elements D(i) and E(i*2-1) are aligned.

This alignment could also be written:

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

These alignments may be visualised as in Figure 28.

   figure13816
Figure 28: Visualisation of Strided Alignment

This alignment is suitable for,

 D = D + E(::2) ! All local


next up previous contents
Next: Reverse Strided Alignment Example Up: Alignment Syntax Previous: Transposed Alignment Example

Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 15:03:35 GMT 1996
Not for commercial use.