Skip to content

Commit

Permalink
[Janitor mode] Fix whitespace
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@25540 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
OpenModelica-Hudson committed Apr 14, 2015
1 parent fa793d4 commit d8ebf83
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
30 changes: 15 additions & 15 deletions Compiler/BackEnd/HpcOmTaskGraph.mo
Expand Up @@ -6036,9 +6036,9 @@ algorithm
allVarLst := listAppend(listAppend(knownVarLst,allVarLst),aliasVarLst);
(visuals,_) := List.mapFold(allVisuals, fillVisualizationObjects,allVarLst);
//print("\nvisuals :\n"+stringDelimitList(List.map(visuals,printViusalization),"\n")+"\n");

//convert to template type and dump
visualsTPL := List.map(visuals,convertToTPLvis);
visualsTPL := List.map(visuals,convertToTPLvis);
GraphML.dumpVis(listArray(visualsTPL), fileName+"_visual.xml");
end visualizationInfoXML;

Expand Down Expand Up @@ -6068,7 +6068,7 @@ algorithm
for i in List.intRange(3) loop
T0 := arrayGet(T,i);
T0tpl := List.map(T0,ExpressionDump.printExpStr);
Ttpl := arrayUpdate(Ttpl,i,T0tpl);
Ttpl := arrayUpdate(Ttpl,i,T0tpl);
end for;
then GraphML.SHAPE_TPL(ident, shapeType, Ttpl, rTPL, r_shapeTpl, lengthDirTPL, widthDirTPL, ExpressionDump.printExpStr(length), ExpressionDump.printExpStr(width), ExpressionDump.printExpStr(height), ExpressionDump.printExpStr(extra), colorTPL, ExpressionDump.printExpStr(specularCoeff));
end match;
Expand All @@ -6095,7 +6095,7 @@ algorithm
name := Util.stringReplaceChar(name,"$",".");
true := stringEqual(stringCharListString(prefix),"Shape$");
vis := GraphML.SHAPE(name,"",arrayCreate(3,{DAE.RCONST(-1),DAE.RCONST(-1),DAE.RCONST(-1)}),
arrayCreate(3,DAE.RCONST(-1)), arrayCreate(3,DAE.RCONST(-1)), arrayCreate(3,DAE.RCONST(-1)),arrayCreate(3,DAE.RCONST(-1)),
arrayCreate(3,DAE.RCONST(-1)), arrayCreate(3,DAE.RCONST(-1)), arrayCreate(3,DAE.RCONST(-1)),arrayCreate(3,DAE.RCONST(-1)),
DAE.RCONST(-1),DAE.RCONST(-1),DAE.RCONST(-1),DAE.RCONST(-1), arrayCreate(3,DAE.RCONST(-1)), DAE.RCONST(-1));
(allVars,vis) := List.fold(allVarsIn,fillVisualizationObjects1,({},vis));
then (vis,allVarsIn);
Expand Down Expand Up @@ -6178,7 +6178,7 @@ algorithm
then (vars, vis);
else
algorithm
(vars,vis) := tplIn;
(vars,vis) := tplIn;
then (varIn::vars, vis);
end matchcontinue;
end fillVisualizationObjects1;
Expand All @@ -6202,7 +6202,7 @@ algorithm
array<list<DAE.Exp>> T;
case(DAE.CREF_IDENT(ident="shapeType"),BackendDAE.VAR(bindExp=SOME(DAE.SCONST(svalue))), GraphML.SHAPE(ident=ident, shapeType=shapeType, T=T, r=r, r_shape=r_shape, lengthDir=lengthDir, widthDir=widthDir, length=length, width=width, height=height, extra=extra, color=color, specularCoeff=specularCoeff))
then (GraphML.SHAPE(ident, svalue, T, r, r_shape, lengthDir, widthDir, length, width, height, extra, color, specularCoeff));

case(DAE.CREF_QUAL(ident="R",componentRef=DAE.CREF_IDENT(ident="T", subscriptLst = {DAE.INDEX(DAE.ICONST(pos)),DAE.INDEX(DAE.ICONST(pos1))})),BackendDAE.VAR(bindExp=bind), GraphML.SHAPE(ident=ident, shapeType=shapeType, T=T, r=r, r_shape=r_shape, lengthDir=lengthDir, widthDir=widthDir, length=length, width=width, height=height, extra=extra, color=color, specularCoeff=specularCoeff))
algorithm
if Util.isSome(bind) then exp := Util.getOption(bind);
Expand All @@ -6228,30 +6228,30 @@ algorithm
end if;
r_shape := arrayUpdate(r_shape,pos,exp);
then (GraphML.SHAPE(ident, shapeType, T, r, r_shape, lengthDir, widthDir, length, width, height, extra, color, specularCoeff));

case(DAE.CREF_IDENT(ident="lengthDirection", subscriptLst = {DAE.INDEX(DAE.ICONST(pos))}),BackendDAE.VAR(bindExp=bind), GraphML.SHAPE(ident=ident, shapeType=shapeType, T=T, r=r, r_shape=r_shape, lengthDir=lengthDir, widthDir=widthDir, length=length, width=width, height=height, extra=extra, color=color, specularCoeff=specularCoeff))
algorithm
if Util.isSome(bind) then exp := Util.getOption(bind);
else exp := BackendVariable.varExp(var);
end if;
lengthDir := arrayUpdate(lengthDir,pos,exp);
then (GraphML.SHAPE(ident, shapeType, T, r, r_shape, lengthDir, widthDir, length, width, height, extra, color, specularCoeff));

case(DAE.CREF_IDENT(ident="widthDirection", subscriptLst = {DAE.INDEX(DAE.ICONST(pos))}),BackendDAE.VAR(bindExp=bind), GraphML.SHAPE(ident=ident, shapeType=shapeType, T=T, r=r, r_shape=r_shape, lengthDir=lengthDir, widthDir=widthDir, length=length, width=width, height=height, extra=extra, color=color, specularCoeff=specularCoeff))
algorithm
if Util.isSome(bind) then exp := Util.getOption(bind);
else exp := BackendVariable.varExp(var);
end if;
widthDir := arrayUpdate(widthDir,pos,exp);
then (GraphML.SHAPE(ident, shapeType, T, r, r_shape, lengthDir, widthDir, length, width, height, extra, color, specularCoeff));

case(DAE.CREF_IDENT(ident="length"),BackendDAE.VAR(bindExp=bind), GraphML.SHAPE(ident=ident, shapeType=shapeType, T=T, r=r, r_shape=r_shape, lengthDir=lengthDir, widthDir=widthDir, length=length, width=width, height=height, extra=extra, color=color, specularCoeff=specularCoeff))
algorithm
if Util.isSome(bind) then length := Util.getOption(bind);
else length := BackendVariable.varExp(var);
end if;
then (GraphML.SHAPE(ident, shapeType, T, r, r_shape, lengthDir, widthDir, length, width, height, extra, color, specularCoeff));

case(DAE.CREF_IDENT(ident="width"),BackendDAE.VAR(bindExp=bind), GraphML.SHAPE(ident=ident, shapeType=shapeType, T=T, r=r, r_shape=r_shape, lengthDir=lengthDir, widthDir=widthDir, length=length, width=width, height=height, extra=extra, color=color, specularCoeff=specularCoeff))
algorithm
if Util.isSome(bind) then width := Util.getOption(bind);
Expand All @@ -6265,14 +6265,14 @@ algorithm
else height := BackendVariable.varExp(var);
end if;
then (GraphML.SHAPE(ident, shapeType, T, r, r_shape, lengthDir, widthDir, length, width, height, extra, color, specularCoeff));

case(DAE.CREF_IDENT(ident="extra"),BackendDAE.VAR(bindExp=bind), GraphML.SHAPE(ident=ident, shapeType=shapeType, T=T, r=r, r_shape=r_shape, lengthDir=lengthDir, widthDir=widthDir, length=length, width=width, height=height, extra=extra, color=color, specularCoeff=specularCoeff))
algorithm
if Util.isSome(bind) then extra := Util.getOption(bind);
else extra := BackendVariable.varExp(var);
end if;
then (GraphML.SHAPE(ident, shapeType, T, r, r_shape, lengthDir, widthDir, length, width, height, extra, color, specularCoeff));

case(DAE.CREF_IDENT(ident="color", subscriptLst = {DAE.INDEX(DAE.ICONST(pos))}),BackendDAE.VAR(bindExp=bind), GraphML.SHAPE(ident=ident, shapeType=shapeType, T=T, r=r, r_shape=r_shape, lengthDir=lengthDir, widthDir=widthDir, length=length, width=width, height=height, extra=extra, color=color, specularCoeff=specularCoeff))
algorithm
if Util.isSome(bind) then exp := Util.getOption(bind);
Expand All @@ -6287,7 +6287,7 @@ algorithm
else specularCoeff := BackendVariable.varExp(var);
end if;
then (GraphML.SHAPE(ident, shapeType, T, r, r_shape, lengthDir, widthDir, length, width, height, extra, color, specularCoeff));

else
algorithm
BackendDAE.VAR(bindExp=bind) := var;
Expand All @@ -6311,12 +6311,12 @@ algorithm
array<DAE.Exp> color, r, widthDir, lengthDir;
array<list<DAE.Exp>> T;
case(GraphML.SHAPE(ident=ident, shapeType=shapeType, color=color, r=r, lengthDir=lengthDir, widthDir=widthDir, T=T, length=length, width=width, height=height))
then ("SHAPE "+ident+" '"+shapeType + "' r{"+stringDelimitList(List.map(arrayList(r),ExpressionDump.printExpStr),",")+"}" +
then ("SHAPE "+ident+" '"+shapeType + "' r{"+stringDelimitList(List.map(arrayList(r),ExpressionDump.printExpStr),",")+"}" +
" lD{"+stringDelimitList(List.map(arrayList(lengthDir),ExpressionDump.printExpStr),",")+"}"+" wD{"+stringDelimitList(List.map(arrayList(widthDir),ExpressionDump.printExpStr),",")+"}"+
" color("+stringDelimitList(List.map(arrayList(color),ExpressionDump.printExpStr),",")+")"+" w: "+ExpressionDump.printExpStr(width)+" h: "+ExpressionDump.printExpStr(height)+" l: "+ExpressionDump.printExpStr(length) +
" T {"+ stringDelimitList(List.map(List.flatten(arrayList(T)),ExpressionDump.printExpStr),", ")+"}");
else
then "-";
then "-";
end match;
end printViusalization;

Expand Down
6 changes: 3 additions & 3 deletions Compiler/SimCode/SimCodeUtil.mo
Expand Up @@ -1561,7 +1561,7 @@ algorithm
if Flags.isSet(Flags.VISUAL_XML) then
HpcOmTaskGraph.visualizationInfoXML(inBackendDAE, filenamePrefix);
end if;

// fcall(Flags.FAILTRACE, print, "is that Cpp? : " + Dump.printBoolStr(ifcpp) + "\n");

// generate initDAE before replacing pre(alias)!
Expand Down Expand Up @@ -1755,8 +1755,8 @@ algorithm
// adrpo: collect all the files from SourceInfo and DAE.ElementSource
// simCode = collectAllFiles(simCode);
// print("*** SimCode -> collect all files done!: " + realString(clock()) + "\n");


if Flags.isSet(Flags.DUMP_SIMCODE) then
dumpSimCode(simCode);
end if;
Expand Down
2 changes: 1 addition & 1 deletion Compiler/Template/GraphMLDumpTpl.tpl
Expand Up @@ -407,7 +407,7 @@ template dumpVis(GraphML.VisualizationTPL vis)
<height><%height%></height>
<extra><%extra%></extra>
<color>{<%colorDump%>}</color>
<specularCoeff><%specularCoeff%></specularCoeff>
<specularCoeff><%specularCoeff%></specularCoeff>
</shape>
>>
end match
Expand Down
8 changes: 4 additions & 4 deletions Compiler/Template/GraphMLDumpTplTV.mo
Expand Up @@ -83,7 +83,7 @@ interface package GraphMLDumpTplTV
input Real r;
output Integer i;
end realInt;

function realString
input Real r;
output String s;
Expand Down Expand Up @@ -136,9 +136,9 @@ interface package GraphMLDumpTplTV
replaceable type TypeB subtypeof Any;
end tuple22;
end Util;

package GraphML

uniontype VisualizationTPL
record SHAPE_TPL
String ident;
Expand All @@ -156,7 +156,7 @@ interface package GraphMLDumpTplTV
String specularCoeff;
end SHAPE_TPL;
end VisualizationTPL;

uniontype GraphInfo
record GRAPHINFOARR
array<Graph> graphs;
Expand Down
2 changes: 1 addition & 1 deletion Compiler/Util/GraphML.mo
Expand Up @@ -599,7 +599,7 @@ end compareAttributeTarget0;
// Dump
// -------------------------

public function dumpVis "author: waurich TUD
public function dumpVis "author: waurich TUD
Dumps the graph into a *.xml-file."
input array<VisualizationTPL> visIn;
input String iFileName;
Expand Down

0 comments on commit d8ebf83

Please sign in to comment.