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 49 for a visualisation.

   figure16205
Figure 49: Visualisation of Alignment to a Template

Return to corresponding overview page gif


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

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