public class OpenAcc extends DirectiveGenerator
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
OPENACC_DEBUG_PREFIX |
| Constructor and Description |
|---|
OpenAcc()
Constructs a new object with the given target.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCreateClause(java.util.List<java.lang.String> vars)
Return construction of the clause for a list of created variables.
|
CompilerDirective |
getDirectiveLanguage()
Get the target of the current generator.
|
java.lang.String[] |
getEndDataRegion()
Get the end pragma to define the end of an directive data region.
|
java.lang.String[] |
getEndLoopDirective()
Get the formatted directive to end the parallelization of a loop.
|
java.lang.String[] |
getEndParallelDirective()
Get the end pragma to define a parallel accelerated region.
|
java.lang.String |
getParallelKeyword()
Get the parallel keyword for a given directive language.
|
java.lang.String |
getPrefix()
Get the prefix for the current directive language.
|
java.lang.String |
getPresentClause(java.util.List<java.lang.String> vars)
Return construction of the clause for a list of present variables.
|
java.lang.String |
getPrivateClause(java.util.List<java.lang.String> vars)
Return construction of the clause for a list of private variables.
|
java.lang.String |
getPrivateClause(java.lang.String var)
Return construction of the clause for a private variable.
|
java.lang.String[] |
getRoutineDirective(boolean seq)
Return the formatted directive to be inserted in a subroutine/function
definition.
|
java.lang.String |
getSequentialClause()
Get the corresponding clause to have a sequential execution of an
accelerated region.
|
java.lang.String[] |
getSingleDirective(java.lang.String clause)
Get formatted pragma defined by the directive directive prefix and the
given clauses.
|
java.util.List<Xcode> |
getSkippedStatementsInEpilogue()
Get the list of skipped statements after directive region.
|
java.util.List<Xcode> |
getSkippedStatementsInPreamble()
Get the list of skipped statements before directive region.
|
java.lang.String[] |
getStartDataRegion(java.util.List<java.lang.String> clauses)
Get the start pragma to define the start of an directive data region.
|
java.lang.String[] |
getStartLoopDirective(int value,
boolean seq,
boolean naked,
java.lang.String clauses)
Get the formatted directive to start the parallelization of a loop.
|
java.lang.String[] |
getStartParallelDirective(java.lang.String clauses)
Get the start pragma to define a parallel accelerated region.
|
java.util.List<Xcode> |
getUnsupportedStatements()
Get the list of unsupported statements in an directive region.
|
java.lang.String[] |
getUpdateClause(DataMovement direction,
java.util.List<java.lang.String> vars)
Get directive for updating directive or host memory with the given
variables.
|
boolean |
isCompileGuard(java.lang.String rawDirective)
Check whether the raw directive is a CLAW compile guard that must be
removed.
|
void |
setExecutionMode(OpenAccExecutionMode mode) |
public static final java.lang.String OPENACC_DEBUG_PREFIX
public void setExecutionMode(OpenAccExecutionMode mode)
public java.lang.String getPrefix()
DirectiveGeneratorgetPrefix in class DirectiveGeneratorpublic java.lang.String[] getStartParallelDirective(java.lang.String clauses)
DirectiveGeneratorgetStartParallelDirective in class DirectiveGeneratorclauses - Additional clauses append at the start directive.public java.lang.String[] getEndParallelDirective()
DirectiveGeneratorgetEndParallelDirective in class DirectiveGeneratorpublic java.lang.String[] getSingleDirective(java.lang.String clause)
DirectiveGeneratorgetSingleDirective in class DirectiveGeneratorclause - Clauses to append to the directive directive prefixpublic java.lang.String getParallelKeyword()
DirectiveGeneratorgetParallelKeyword in class DirectiveGeneratorpublic java.lang.String getPrivateClause(java.lang.String var)
DirectiveGeneratorgetPrivateClause in class DirectiveGeneratorvar - Variable name that will be inserted in the generated clause.public java.lang.String getPrivateClause(java.util.List<java.lang.String> vars)
DirectiveGeneratorgetPrivateClause in class DirectiveGeneratorvars - List of variables name that will be inserted in the generated
clause.public java.lang.String getPresentClause(java.util.List<java.lang.String> vars)
DirectiveGeneratorgetPresentClause in class DirectiveGeneratorvars - List of variables name that will be inserted in the generated
clause.public java.lang.String getCreateClause(java.util.List<java.lang.String> vars)
DirectiveGeneratorgetCreateClause in class DirectiveGeneratorvars - List of variables name that will be inserted in the generated
clause.public java.lang.String[] getRoutineDirective(boolean seq)
DirectiveGeneratorgetRoutineDirective in class DirectiveGeneratorseq - Apply sequential mode to the routine directivepublic boolean isCompileGuard(java.lang.String rawDirective)
DirectiveGeneratorisCompileGuard in class DirectiveGeneratorrawDirective - The raw directive without any preprocessing.public CompilerDirective getDirectiveLanguage()
DirectiveGeneratorgetDirectiveLanguage in class DirectiveGeneratorpublic java.lang.String[] getStartDataRegion(java.util.List<java.lang.String> clauses)
DirectiveGeneratorgetStartDataRegion in class DirectiveGeneratorclauses - Additional clauses append at the start directive.public java.lang.String[] getEndDataRegion()
DirectiveGeneratorgetEndDataRegion in class DirectiveGeneratorpublic java.lang.String getSequentialClause()
DirectiveGeneratorgetSequentialClause in class DirectiveGeneratorpublic java.lang.String[] getStartLoopDirective(int value,
boolean seq,
boolean naked,
java.lang.String clauses)
DirectiveGeneratorgetStartLoopDirective in class DirectiveGeneratorvalue - Collapse value. if greater than 0, a collapse clause will be
added to the construct.seq - If true, loop should be executed in a sequential mode.naked - If true, simple directive is generated without special
clauses.clauses - Additional clauses append at the start directive.public java.lang.String[] getEndLoopDirective()
DirectiveGeneratorgetEndLoopDirective in class DirectiveGeneratorpublic java.util.List<Xcode> getUnsupportedStatements()
DirectiveGeneratorgetUnsupportedStatements in class DirectiveGeneratorpublic java.util.List<Xcode> getSkippedStatementsInPreamble()
DirectiveGeneratorgetSkippedStatementsInPreamble in class DirectiveGeneratorpublic java.util.List<Xcode> getSkippedStatementsInEpilogue()
DirectiveGeneratorgetSkippedStatementsInEpilogue in class DirectiveGeneratorpublic java.lang.String[] getUpdateClause(DataMovement direction, java.util.List<java.lang.String> vars)
DirectiveGeneratorgetUpdateClause in class DirectiveGeneratordirection - Direction of the update.vars - List of variables.