Search in sources :

Example 1 with DirectiveNone

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();
}
Also used : OpenMp(claw.tatsu.directive.generator.OpenMp) ModuleCache(claw.tatsu.xcodeml.module.ModuleCache) OpenAcc(claw.tatsu.directive.generator.OpenAcc) OpenMpConfiguration(claw.tatsu.directive.configuration.OpenMpConfiguration) DirectiveNone(claw.tatsu.directive.generator.DirectiveNone)

Aggregations

OpenMpConfiguration (claw.tatsu.directive.configuration.OpenMpConfiguration)1 DirectiveNone (claw.tatsu.directive.generator.DirectiveNone)1 OpenAcc (claw.tatsu.directive.generator.OpenAcc)1 OpenMp (claw.tatsu.directive.generator.OpenMp)1 ModuleCache (claw.tatsu.xcodeml.module.ModuleCache)1