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

 

Simple 2D Alignment Example

Given,

    REAL, DIMENSION(10,10) :: A, B
!HPF$ ALIGN A(:,:) WITH B(:,:)

This is much the same as the previous example except that we are aligning 2D arrays. Each array is aligned dimension by dimension. The net effect of this alignment is that A(i,j) and B(i,j) reside on the same processor. Effectively, this says: tex2html_wrap_inline29494 i, j, elements A(i,j) and B(i,j) are local.

The following align statement is equivalent but does not imply shape conformance:

!HPF$ ALIGN A(i,j) WITH B(i,j)

Now try this question gif

Return to corresponding overview page gif  

Figure 42 is supposed to show how elements A(1,1) and B(1,1) are aligned with each other. Alignment between every element of the first row of A and the first row of B is shown.

   figure15609
Figure 42: Visualisation of 2D Alignment

The two shaded blobs are also aligned and are therefore resident on the same processor.

This alignment is suitable for,

 A = A + B + A*B ! all local

Return to corresponding overview page gif


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

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