fdvmLDe (1158420), страница 10
Текст из файла (страница 10)
| distributee | is array-name |
| or pointer-name | |
| or template-name |
| dist-format | is BLOCK |
| or GEN_BLOCK ( block-array-name ) | |
| or * |
| dist-onto-clause | is ONTO dist-target |
| dist-target | is processors-name [( section-subscript-list )] |
| or task-name ( task-index ) | |
| section-subscript | is [ subscript ] : [ subscript ] |
Constraints:
-
A length of dist-format-list must be equal to the rank of each distributee to which it applies. That is, distribution format must be specified for every array dimension.
-
The number of distributed dimensions of the array (format is not specified as *) has to be equal to the number of dimensions of dist-target.
-
The array mentioned as a block-array-name in GEN_BLOCK specification must be one-dimensional integer array, with size equal to the size of corresponding dimension of processor arrangement, and a sum of its element values is equal to the size of distributed dimension.
-
REDISTRIBUTE directive can be applied to arrays with DYNAMIC attribute only.
-
dist-directive-stuff can be omitted in DISTRIBUTE directive only. In that case distributed array can be used after REDISTRIBUTE directive execution only.
4.2.2. Dynamic arrays in FDVM model. POINTER directive
| pointer-directive | is type , POINTER ( dimension-list ) :: pointer-name-list |
| dimension | is : |
| pointer-name | is scalar-int-variable-name |
| or int-array-name |
Constraints:
-
Only value of function ALLOCATE or a value of other variable with attribute POINTER can be assigned to the variable with POINTER attribute.
-
A number of dimensions in left and right sides of the statement assigning value to the variable with POINTER attribute must be the same.
4.3.1. ALIGN and REALIGN directives
| align-directive | is align-action alignee align-directive-stuff |
| or align-action [ align-directive-stuff ] :: alignee‑list | |
| align-action | is ALIGN |
| or REALIGN | |
| align-directive-stuff | is ( align-source-list ) align-with-clause |
| alignee | is array-name |
| or pointer-name |
| align-source | is * |
| or align-dummy |
| align-dummy | is scalar-int-variable |
| align-with-clause | is WITH align-spec |
| align-spec | is align-target ( align-subscript-list ) |
| align-target | is array-name |
| or template-name | |
| or pointer-name |
| align-subscript | is int-expr |
| or align-dummy-use | |
| or * |
| align-dummy-use | is [ primary-expr * ] align‑dummy [ add-op primary-expr ] |
| primary-expr | is int-constant |
| or int-variable | |
| or ( int-expr ) | |
| add-op | is + |
| or - |
Constraints:
-
A length of align-source-list must be equal to the rank of aligned array.
-
A length of align-subscript-list must be equal to the rank of align‑target.
-
Each align-dummy may appear at most once in an align-subscript-list.
-
An array-name mentioned as an alignee may not appear as a distributee.
-
REALIGN directive may be applied only to the arrays specified in DYNAMIC directives.
-
align-directive-stuff can be omitted only in ALIGN directive. In such a case the distributed array can be used only after execution of REALIGN directive.
4.3.2. TEMPLATE directive
| template-directive | is TEMPLATE template-decl-list |
| template-decl | is template-name [ ( explicit-shape-spec-list ) ] |
4.4. DYNAMIC and NEW_VALUE directives
| dynamic-directive | is DYNAMIC alignee-or-distributee-list |
| alignee-or-distributee | is alignee |
| or distributee |
| new-value-directive | is NEW_VALUE |
5.1.2. Distribution of loop iterations. PARALLEL directive
| parallel-directive | is PARALLEL ( do-variable-list ) ON iteration-align-spec [ , new-clause ] [ , reduction-clause] [ , shadow-renew-clause] [ , remote-access-clause ] [ , across-clause ] |
| iteration-align-spec | is align-target ( iteration-align-subscript-list ) |
| iteration-align-subscript | is int-expr |
| or do-variable-use | |
| or * | |
| do-variable-use | is [ primary-expr * ] do-variable [ add-op primary-expr ] |
5.1.3. Private variables. NEW clause
| new-clause | is NEW ( new-variable-list ) |
| new-variable | is array-name |
| or scalar-variable-name |
Constraint:
-
The distributed arrays cannot be used as NEW-variables.
5.1.4. Reduction operations and variables. REDUCTION clause
| reduction-clause | is REDUCTION ( [ reduction-group-name : ] reduction-op-list ) |
| reduction-op | is reduction-op-name ( reduction-variable ) |
| or reduction-loc-name ( reduction-variable , location-variable, int-expr) |
| reduction-variable | is array-name |
| or scalar-variable-name |
| location-variable | is array-name |
| reduction-op-name | is SUM |
| or PRODUCT | |
| or MAX | |
| or MIN | |
| or AND | |
| or OR | |
| or EQV | |
| or NEQV |
| reduction-loc-name | is MAXLOC |
| or MINLOC |
Constraints:
-
Distributed arrays cannot be used as reduction variables.
-
Reduction variables are calculated and used only inside the loop in statements of a certain type: the reduction statements.
6.2.1. Specification of array with shadow edges
| shadow-directive | is SHADOW dist-array ( shadow-edge-list ) |
| or SHADOW ( shadow-edge-list ) :: dist-array-list |
| dist-array | is array-name |
| or pointer-name |
| shadow-edge | is width |
| or low-width : high-width |
| width | is int-expr |
| low-width | is int-expr |
| high-width | is int-expr |
Constraints:
-
The int-expr representing a width, low-width, or high-width must be a constant specification expression with value greater than or equal to 0.
-
A shadow-edge specification of width is equivalent to a shadow-edge of width : width.
-
By default distributed array has a shadow width of 1 on both sides of each distributed dimension.
6.2.2. Synchronous specification of independent references of SHADOW type for single loop
| shadow-renew-clause | is SHADOW_RENEW ( renewee‑list ) |
| or shadow-start-directive | |
| or shadow-wait-directive |
| renewee | is dist-array-name [ ( shadow-edge-list )] [ (CORNER) ] |
Constraints:
-
Width of the shadow edges filled by values must not exceed the maximal width specified initially in the SHADOW directive.
-
If shadow edge widths is not specified, then the maximal widths are used.
6.2.3. ACROSS specification of dependent references of SHADOW type for single loop
| across-clause | is ACROSS ( dependent-array-list ) |
| dependent-array | is dist-array-name ( dependence-list ) ) [ (CORNER) ] |
| dependence | is flow-dep-length : anti-dep-length |
| flow-dep-length | is int-constant |
| anti-dep-length | is int-constant |
6.2.4. Asynchronous specification of independent references of SHADOW type for single loop
| shadow-group-directive | is SHADOW_GROUP shadow-group-name ( renewee-list ) |
| shadow-start-directive | is SHADOW_START shadow-group-name |















