1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-04 18:05:50 +00:00

Fixed error in vae_model settings parser.

This commit is contained in:
jespergravgaard 2020-02-26 00:13:03 +01:00
parent 7135c08d6f
commit 5e6ac1a0cd

View File

@ -133,6 +133,11 @@ public class VariableBuilderConfig {
this.memoryArea = memoryArea; this.memoryArea = memoryArea;
this.optimization = optimization; this.optimization = optimization;
} }
@Override
public String toString() {
return (scope + "_" + type + "_" + optimization + "_" + memoryArea).toLowerCase();
}
} }
/** Key of the settings map containing scope & type. */ /** Key of the settings map containing scope & type. */
@ -179,11 +184,9 @@ public class VariableBuilderConfig {
throw new CompileError("Warning: Malformed var_model parameter " + pragmaParam, statementSource); throw new CompileError("Warning: Malformed var_model parameter " + pragmaParam, statementSource);
for(Scope scope : scopes) { for(Scope scope : scopes) {
for(Type type : types) { for(Type type : types) {
if(memoryArea == null) MemoryArea mem = (memoryArea != null) ? memoryArea : getSetting(scope, type).memoryArea;
memoryArea = getSetting(scope, type).memoryArea; Optimization opt = (optimization != null) ? optimization : getSetting(scope, type).optimization;
if(optimization == null) settings.put(new ScopeType(scope, type), new Setting(scope, type, mem, opt));
optimization = getSetting(scope, type).optimization;
settings.put(new ScopeType(scope, type), new Setting(scope, type, memoryArea, optimization));
} }
} }
} }