public class OpenAccContinuation extends ClawTransformation
OpenACC line continuation transformation. The XcodeML/F pragma statement representation is an aggregated version of the pragma with all its continuation lines. As those directives are not handled by the CLAW XcodeML to XcodeML translator, they must be output in a correct way. This transformation divides the XcodeML representation back to a multi-line pragma definition. Example: The followings OpenACC directives in Fortran code: !$acc data & !$acc present (a,b,c,d,e,f,g) are represented in XcodeML with <FpragmaStatement>acc data present (a,b,c,d,e,f,g)</FpragmaStatement> Based on the defined max columns, the pragma statement will be splitted.
_claw
Constructor and Description |
---|
OpenAccContinuation(ClawPragma directive)
Constructs a new OpenACC continuation triggered from a specific pragma.
|
Modifier and Type | Method and Description |
---|---|
boolean |
abortOnFailedAnalysis()
Tells whether the transformation should abort the translation if the
analysis fails.
|
boolean |
analyze(XcodeProgram xcodeml,
Translator translator)
Check if the directive starts with the OpenACC prefix.
|
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 transformation)
Apply the OpenACC continuation transformation.
|
getLanguageInfo, removePragma
getDirective, getStartLine, isTransformed, setStartLine, transformed
public OpenAccContinuation(ClawPragma directive)
directive
- The directive that triggered the OpenACC continuation
transformation.public boolean analyze(XcodeProgram xcodeml, Translator translator)
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 transformation) throws IllegalTransformationException
transform
in class Transformation
xcodeml
- The XcodeML on which the transformations are
applied.translator
- The translator used to applied the transformations.transformation
- Not used in this transformationIllegalTransformationException
- if the transformation cannot be
applied.public boolean abortOnFailedAnalysis()
Transformation
abortOnFailedAnalysis
in class Transformation