public class ArrayTransform extends ClawBlockTransformation
An ArrayTransform transformation is an independent transformation. It transforms the Fortran array notation into single or nested do statements. Array notation example: A(1:n) = A(1+m:n+m) + B(1:n) * C(n+1:n+n) DO i=1,n A(i) = A(i+m) + B(i) * C(n+i) END DO
_clawEnd, _clawStart
Constructor and Description |
---|
ArrayTransform(ClawPragma begin,
ClawPragma end)
Constructs a new ArrayTransform triggered from a specific directive.
|
Modifier and Type | Method and Description |
---|---|
boolean |
analyze(XcodeProgram xcodeml,
Translator translator)
Analyze the possibility to apply the transformation.
|
boolean |
canBeTransformedWith(XcodeProgram xcodeml,
Transformation other)
Check whether the current transformation can be transformed together with
the given transformation.
|
void |
transform(XcodeProgram xcodeml,
Translator translator,
Transformation other)
Transform an assignment using array notation to a do statement.
|
removePragma
getEndDirective
abortOnFailedAnalysis, getDirective, getStartLine, isTransformed, setStartLine, transformed
public ArrayTransform(ClawPragma begin, ClawPragma end)
begin
- The directive that triggered the array transform
transformation.end
- The directive that close the block transformation.
Can be null.public boolean analyze(XcodeProgram xcodeml, Translator translator)
Transformation
analyze
in class Transformation
xcodeml
- The XcodeML on which the transformations are applied.translator
- The translator used to applied the transformations.public boolean canBeTransformedWith(XcodeProgram xcodeml, Transformation other)
Transformation
canBeTransformedWith
in class Transformation
xcodeml
- The XcodeML on which the transformations are applied.other
- The other transformation part of the dependent transformation.Transformation.canBeTransformedWith(XcodeProgram, Transformation)
public void transform(XcodeProgram xcodeml, Translator translator, Transformation other) throws java.lang.Exception
transform
in class Transformation
xcodeml
- The XcodeML on which the transformations are applied.translator
- The translator used to applied the transformations.other
- Only for dependent transformation. The other
transformation part of the transformation.java.lang.Exception
- If the transformation cannot be applied.