use of claw.tatsu.directive.generator.DirectiveNone in project claw-compiler by C2SM-RCM.
the class Context method init.
public void init(CompilerDirective compilerDirective, Target target, AcceleratorConfiguration acceleratorConfiguration, int maxColumns) {
if (compilerDirective != null) {
_compilerDirective = compilerDirective;
if (compilerDirective == CompilerDirective.OPENACC) {
OpenAcc gen = new OpenAcc(this);
_directiveGenerator = gen;
if (acceleratorConfiguration != null) {
gen.setExecutionMode(((OpenAccConfiguration) acceleratorConfiguration).getMode());
}
} else if (compilerDirective == CompilerDirective.OPENMP) {
OpenMp gen = new OpenMp(this);
_directiveGenerator = gen;
if (acceleratorConfiguration != null) {
gen.setExecutionMode(((OpenMpConfiguration) acceleratorConfiguration).getMode());
}
} else {
_directiveGenerator = new DirectiveNone();
}
} else {
_compilerDirective = CompilerDirective.NONE;
_directiveGenerator = new DirectiveNone();
}
_acceleratorConfiguration = acceleratorConfiguration;
if (target == null) {
_target = Target.NONE;
} else {
_target = target;
}
_maxColumns = maxColumns;
_moduleCache = new ModuleCache();
}
Aggregations