public abstract class DirectiveGenerator
extends java.lang.Object
Constructor and Description |
---|
DirectiveGenerator() |
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.
|
abstract CompilerDirective |
getDirectiveLanguage()
Get the target of the current generator.
|
abstract java.lang.String[] |
getEndDataRegion()
Get the end pragma to define the end of an directive data region.
|
abstract java.lang.String[] |
getEndLoopDirective()
Get the formatted directive to end the parallelization of a loop.
|
abstract java.lang.String[] |
getEndParallelDirective()
Get the end pragma to define a parallel accelerated region.
|
abstract java.lang.String |
getParallelKeyword()
Get the parallel keyword for a given directive language.
|
abstract 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.
|
abstract java.lang.String |
getPrivateClause(java.util.List<java.lang.String> vars)
Return construction of the clause for a list of private variables.
|
abstract java.lang.String |
getPrivateClause(java.lang.String var)
Return construction of the clause for a private variable.
|
abstract java.lang.String[] |
getRoutineDirective(boolean seq)
Return the formatted directive to be inserted in a subroutine/function
definition.
|
abstract java.lang.String |
getSequentialClause()
Get the corresponding clause to have a sequential execution of an
accelerated region.
|
abstract 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.
|
abstract java.lang.String[] |
getStartDataRegion(java.util.List<java.lang.String> clauses)
Get the start pragma to define the start of an directive data region.
|
abstract 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.
|
abstract 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.
|
abstract boolean |
isCompileGuard(java.lang.String rawDirective)
Check whether the raw directive is a CLAW compile guard that must be
removed.
|
public abstract java.lang.String getPrefix()
public abstract java.lang.String[] getStartParallelDirective(java.lang.String clauses)
clauses
- Additional clauses append at the start directive.public abstract java.lang.String[] getEndParallelDirective()
public abstract java.lang.String[] getStartLoopDirective(int value, boolean seq, boolean naked, java.lang.String clauses)
value
- 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 abstract java.lang.String[] getEndLoopDirective()
public abstract java.lang.String[] getSingleDirective(java.lang.String clause)
clause
- Clauses to append to the directive directive prefixpublic abstract java.lang.String getParallelKeyword()
public abstract java.lang.String getPrivateClause(java.lang.String var)
var
- Variable name that will be inserted in the generated clause.public abstract java.lang.String getPrivateClause(java.util.List<java.lang.String> vars)
vars
- List of variables name that will be inserted in the generated
clause.public java.lang.String getPresentClause(java.util.List<java.lang.String> vars)
vars
- List of variables name that will be inserted in the generated
clause.public java.lang.String getCreateClause(java.util.List<java.lang.String> vars)
vars
- List of variables name that will be inserted in the generated
clause.public abstract java.lang.String[] getRoutineDirective(boolean seq)
seq
- Apply sequential mode to the routine directivepublic abstract boolean isCompileGuard(java.lang.String rawDirective)
rawDirective
- The raw directive without any preprocessing.public abstract CompilerDirective getDirectiveLanguage()
public abstract java.lang.String[] getStartDataRegion(java.util.List<java.lang.String> clauses)
clauses
- Additional clauses append at the start directive.public abstract java.lang.String[] getEndDataRegion()
public abstract java.lang.String getSequentialClause()
public java.util.List<Xcode> getUnsupportedStatements()
public java.util.List<Xcode> getSkippedStatementsInPreamble()
public java.util.List<Xcode> getSkippedStatementsInEpilogue()
public java.lang.String[] getUpdateClause(DataMovement direction, java.util.List<java.lang.String> vars)
direction
- Direction of the update.vars
- List of variables.