Skip to content

Commit 57c9092

Browse files
committed
- some more fixes for vectorization
1 parent 1ff5d9a commit 57c9092

File tree

4 files changed

+441
-57
lines changed

4 files changed

+441
-57
lines changed

Compiler/BackEnd/BackendDAEUtil.mo

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5268,6 +5268,31 @@ algorithm
52685268
sharedOut := BackendDAE.SHARED(knownVars,externalObjects,aliasVars,initialEqs,removedEqs,constraints,classAttrs,cache,graph,functionTree,eventInfo,extObjClasses,backendDAEType,symjacs,info);
52695269
end replaceAliasVarsInShared;
52705270

5271+
public function replaceRemovedEqsInShared"replaces the aliasVars in the BackendDAE.Shared
5272+
author:Waurich TUD 2014-11"
5273+
input BackendDAE.Shared sharedIn;
5274+
input BackendDAE.EquationArray remEqs;
5275+
output BackendDAE.Shared sharedOut;
5276+
protected
5277+
BackendDAE.Variables knownVars,externalObjects,aliasVars;
5278+
BackendDAE.EquationArray initialEqs,removedEqs;
5279+
list<DAE.Constraint> constraints;
5280+
list<DAE.ClassAttributes> classAttrs;
5281+
FCore.Cache cache;
5282+
FCore.Graph graph;
5283+
DAE.FunctionTree functionTree;
5284+
BackendDAE.EventInfo eventInfo;
5285+
BackendDAE.ExternalObjectClasses extObjClasses;
5286+
BackendDAE.BackendDAEType backendDAEType;
5287+
BackendDAE.SymbolicJacobians symjacs;
5288+
BackendDAE.ExtraInfo info;
5289+
algorithm
5290+
BackendDAE.SHARED(knownVars=knownVars,externalObjects=externalObjects,aliasVars=aliasVars,initialEqs=initialEqs,removedEqs=removedEqs,
5291+
constraints=constraints,classAttrs=classAttrs,cache=cache,graph=graph,functionTree=functionTree,eventInfo=eventInfo,extObjClasses=extObjClasses,
5292+
backendDAEType=backendDAEType,symjacs=symjacs,info=info) := sharedIn;
5293+
sharedOut := BackendDAE.SHARED(knownVars,externalObjects,aliasVars,initialEqs,remEqs,constraints,classAttrs,cache,graph,functionTree,eventInfo,extObjClasses,backendDAEType,symjacs,info);
5294+
end replaceRemovedEqsInShared;
5295+
52715296
protected function adjacencyRowExpEnhanced
52725297
"author: Frenkel TUD 2012-05
52735298
Helper function to adjacencyRowEnhanced, investigates expressions for

Compiler/BackEnd/BackendDump.mo

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,15 +1421,17 @@ algorithm
14211421
list<DAE.Exp> expl;
14221422
DAE.ComponentRef cr;
14231423
BackendDAE.WhenEquation weqn;
1424+
BackendDAE.EquationAttributes attr;
14241425
DAE.Algorithm alg;
14251426
DAE.ElementSource source;
14261427
list<list<BackendDAE.Equation>> eqnstrue;
14271428
list<BackendDAE.Equation> eqnsfalse,eqns;
1428-
case (BackendDAE.EQUATION(exp = e1,scalar = e2))
1429+
case (BackendDAE.EQUATION(exp = e1,scalar = e2, attr=attr))
14291430
equation
14301431
s1 = ExpressionDump.printExpStr(e1);
14311432
s2 = ExpressionDump.printExpStr(e2);
1432-
res = stringAppendList({s1," = ",s2});
1433+
s3 = printEqAtts(attr);
1434+
res = stringAppendList({s1," = ",s2," ",s3});
14331435
then
14341436
res;
14351437
case (BackendDAE.COMPLEX_EQUATION(left = e1,right = e2))
@@ -2319,7 +2321,7 @@ algorithm
23192321
outStr := DAEDump.dumpDirectionStr(dir) + ComponentReference.printComponentRefStr(cr) + ":"
23202322
+ kindString(kind) + "(" + connectorTypeString(ct) + attributesString(dae_var_attr)
23212323
+ ") " + optExpressionString(bindExp,"") + DAEDump.dumpCommentAnnotationStr(comment)
2322-
+ stringDelimitList(paths_lst, ", ") + " type: " + dumpTypeStr(var_type);
2324+
+ stringDelimitList(paths_lst, ", ") + " type: " + dumpTypeStr(var_type) + "["+ExpressionDump.dimensionsString(arrayDim)+"]";
23232325
end varString;
23242326

23252327
public function dumpKind
@@ -3645,13 +3647,13 @@ algorithm
36453647
local
36463648
String s1,s2,s3;
36473649
String loopId;
3648-
Integer pos;
3650+
Integer id;
36493651
DAE.Exp startIt;
36503652
DAE.Exp endIt;
36513653
list<BackendDAE.IterCref> crefs;
3652-
case(BackendDAE.LOOP(startIt=startIt, endIt=endIt, crefs=crefs))
3654+
case(BackendDAE.LOOP(loopId=id, startIt=startIt, endIt=endIt, crefs=crefs))
36533655
equation
3654-
s1 = "LOOP:";
3656+
s1 = "LOOP"+intString(id)+":";
36553657
s2 = "[ "+ExpressionDump.printExpStr(startIt)+"->"+ExpressionDump.printExpStr(endIt)+" ] ";
36563658
s3 = stringDelimitList(List.map(crefs,printIterCrefStr),"| ");
36573659
then s1+s2+s3;

0 commit comments

Comments
 (0)