public final class Field
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
adaptAllocate(PromotionInfo promotionInfo,
Xnode parent,
XcodeProgram xcodeml)
Adapt allocate statement with given dimension.
|
static void |
adaptArrayRef(PromotionInfo promotionInfo,
Xnode parent,
XcodeProgram xcodeml)
Adapt all the array references of the variable in the data clause in the
current function/subroutine definition.
|
static void |
adaptScalarRefToArrayRef(java.lang.String identifier,
FfunctionDefinition fctDef,
java.util.List<DimensionDefinition> dims,
XcodeML xcodeml)
Adapt all the array references of the variable in the data clause in the
current function/subroutine definition.
|
static void |
demote(Xnode arrayRef,
java.util.List<java.lang.Integer> keptDimensions)
Demote an array reference to a reference with fewer dimensions.
|
static void |
demoteToScalar(Xnode arrayRef)
Demote an array reference to a var reference.
|
static void |
promote(PromotionInfo fieldInfo,
FfunctionDefinition fctDef,
XcodeProgram xcodeml)
Promote a field with the information stored in the defined dimensions.
|
static void |
reshape(FfunctionDefinition fctDef,
ReshapeInfo reshapeInfo,
XcodeProgram xcodeml)
Reshape field in function definition.
|
public static void promote(PromotionInfo fieldInfo, FfunctionDefinition fctDef, XcodeProgram xcodeml) throws IllegalTransformationException
fieldInfo - Promotion information. Must contains identifier and
dimensions.fctDef - Function definition node in which the promotion is
performed.xcodeml - Current XcodeML translation unit.IllegalTransformationException - If promotion information are not
sufficient. If types cannot be found
in typeTable.public static void adaptScalarRefToArrayRef(java.lang.String identifier,
FfunctionDefinition fctDef,
java.util.List<DimensionDefinition> dims,
XcodeML xcodeml)
identifier - List of array identifiers that must be adapted.fctDef - Function definition in which reference are changed.dims - Dimension definition to use for array index generation.xcodeml - Current XcodeML program unit in which the element will be
created.public static void adaptAllocate(PromotionInfo promotionInfo, Xnode parent, XcodeProgram xcodeml)
promotionInfo - Promotion information. Must contains identifier and
dimensions.parent - Root node from which allocate statements are looked
for.xcodeml - Current XcodeML translation unit.public static void demoteToScalar(Xnode arrayRef) throws IllegalTransformationException
arrayRef - The array reference to be modified.IllegalTransformationException - If node is null or not an FarrayRef.public static void demote(Xnode arrayRef, java.util.List<java.lang.Integer> keptDimensions) throws IllegalTransformationException
arrayRef - The array reference to be modified.keptDimensions - List of dimensions to be kept. Dimension index starts
at 1.IllegalTransformationException - If node is null or not an FarrayRef.public static void reshape(FfunctionDefinition fctDef, ReshapeInfo reshapeInfo, XcodeProgram xcodeml) throws IllegalTransformationException
fctDef - Function definition.reshapeInfo - Reshape information.xcodeml - Current XcodeML/F translation unit.IllegalTransformationException - If reshape cannot be done.public static void adaptArrayRef(PromotionInfo promotionInfo, Xnode parent, XcodeProgram xcodeml)
promotionInfo - Promotion information used for the promotion of the
field.parent - Root node of the tree in which the adaptation is done.xcodeml - Current XcodeML translation unit.