[ HPF Home | Versions | Compilers | Projects | Publications | Applications | Benchmarks | Events | Contact ]



Next:
AlignmentDistribution, and Up: Data Alignment and Previous: TEMPLATE Directive

INHERIT Directive

The INHERIT directive specifies that a dummy argument should be aligned to a copy of the template of the corresponding actual argument in the same way that the actual argument is aligned.

XBNF inherit-directive -to -rule to to is INHERIT dummy-argument-name-list XBNF

The INHERIT directive causes the named subprogram dummy arguments to have the INHERIT attribute. Only dummy arguments may have the INHERIT attribute. An object must not have both the INHERIT attribute and the ALIGN attribute. The INHERIT directive may appear only in a specification-part of a scoping unit.

The INHERIT attribute specifies that the template for a dummy argument should be inherited, by making a copy of the template of the actual argument. Moreover, the INHERIT attribute implies a default distribution of DISTRIBUTE * ONTO *.

See Section for further exposition. If an explicit mapping directive appears for the dummy argument, thereby overriding the default distribution, then the actual argument must be a whole array or a regular array section; it may not be an expression of any other form.

If none of the attributes INHERIT, ALIGN, and DISTRIBUTE is specified explicitly for a dummy argument, then the template of the dummy argument has the same shape as the dummy itself and the dummy argument is aligned to its template by the identity mapping.

An INHERIT directive may be combined with other directives, with the attributes stated in any order, more or less consistent with Fortran 90 attribute syntax.

Consider the following example:

REAL DOUGH(100) !HPF$ INHERIT BREAD The inherited template of BREAD has shape [100]; element BREAD(I) is aligned with element 5 + 2*I of the inherited template and, since BREAD does not appear in a prescriptive DISTRIBUTE directive, it has a BLOCK(10) distribution.



©2000-2006 Rice University [ Contact Us | HiPerSoft | Computer Science ]

paula@erc.msstate.edu
Thu Dec 8 16:17:11 CST 1994