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 may not have both the INHERIT attribute and the ALIGN attribute. The INHERIT directive may only appear 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 *. Note that this default distribution is not part of Subset HPF; if a program uses INHERIT, it must override the default distribution with an explicit mapping directive in order to conform to Subset HPF. 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.

AlignmentDistribution, and Up: Data Alignment and Previous: TEMPLATE Directive
Thu Jul 21 17:05:43 CDT 1994