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:
parent
7135c08d6f
commit
5e6ac1a0cd
@ -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));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user