next up previous contents
Next: Combined Directive Up: Template Syntax Previous: Template Syntax

 

Simple Template Example

The alignment between an array and a template works in exactly the same way as between two arrays. For example,

      REAL, DIMENSION(10)     :: A, B
!HPF$ TEMPLATE, DIMENSION(10) :: T
!HPF$ DISTRIBUTE (BLOCK)      :: T
!HPF$ ALIGN (:) WITH T(:)     :: A, B

In this example, a 10 element TEMPLATE, T is declared. Its distribution method is BLOCK and there are two arrays aligned to it, A and B. Since T is used as the align-target it is the only entity that may be distributed. (A and B are alignees so may not be.) See Figure 33 for a visualisation.

   figure14419
Figure 33: Visualisation of Alignment to a Template


next up previous contents
Next: Combined Directive Up: Template Syntax Previous: Template Syntax

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