codimension¶
One codimension of a coarray.
Declaration¶
Syntax¶
codimension = (expr? start, expr? end, codimension_type end_star)
Arguments¶
Argument |
Description |
|---|---|
|
the lower cobound. |
|
the upper cobound, when |
|
whether the upper cobound is an expression or |
Return values¶
None.
Description¶
Unlike a dimension this holds the two bounds rather than a
bound and an extent, because the last codimension is always *: its extent
depends on the number of images and is only known at run time.
Codimensions live on the Variable rather than on the type, since they describe how copies of the object are distributed across images and not the shape of one copy.
Examples¶
(codimension
:start (IntegerConstant
:n 1
:type (Integer
:kind 4
)
:intboz_type :Decimal
)
:end nil
:end_star :CodimensionExpr
)
It comes from this complete ASR text document:
(TranslationUnit
:symtab (SymbolTable
:id 0
:symbols {
"main" (Program
:symtab (SymbolTable
:id 1
:symbols {
"a" (Variable
:parent_symtab 1
:name "a"
:dependencies []
:intent :Local
:symbolic_value nil
:value nil
:storage :Default
:type (Integer
:kind 4
)
:type_declaration nil
:abi :Source
:access :Public
:presence :Required
:value_attr false
:target_attr false
:contiguous_attr false
:bindc_name nil
:is_volatile false
:is_protected false
:pass_attr :NotMethod
:self_argument nil
:codims [
(codimension
:start (IntegerConstant
:n 1
:type (Integer
:kind 4
)
:intboz_type :Decimal
)
:end nil
:end_star :CodimensionExpr
)
]
)
"i" (Variable
:parent_symtab 1
:name "i"
:dependencies []
:intent :Local
:symbolic_value nil
:value nil
:storage :Default
:type (Integer
:kind 4
)
:type_declaration nil
:abi :Source
:access :Public
:presence :Required
:value_attr false
:target_attr false
:contiguous_attr false
:bindc_name nil
:is_volatile false
:is_protected false
:pass_attr :NotMethod
:self_argument nil
:codims []
)
}
)
:name "main"
:dependencies []
:body [
(Assignment
:target (Var
:v (SymbolRef 1 "i")
)
:value (CoarrayRef
:var (Var
:v (SymbolRef 1 "a")
)
:coindices [
(coarray_index
:index (IntegerConstant
:n 1
:type (Integer
:kind 4
)
:intboz_type :Decimal
)
:star :CodimensionExpr
)
]
:type (Integer
:kind 4
)
:value nil
)
:overloaded nil
:realloc_lhs false
:move_allocation false
)
]
)
}
)
:items []
)