Skip to content

Commit

Permalink
Added index reduction to optdaedump
Browse files Browse the repository at this point in the history
  • Loading branch information
lochel committed Sep 23, 2015
1 parent 56804f2 commit 0ed9bc8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Compiler/BackEnd/IndexReduction.mo
Expand Up @@ -114,6 +114,10 @@ algorithm
BackendDAE.Shared shared;

case _::_ equation
if Flags.isSet(Flags.OPT_DAE_DUMP) then
print("\n\nIndex reduction:\n");
end if;

// BackendDump.printEqSystem(inSystem);
// BackendDump.dumpMatching(inAssignments1);
// BackendDump.dumpMatching(inAssignments2);
Expand All @@ -137,15 +141,25 @@ algorithm
changedeqns = if newsize>size then List.intRange2(size+1, newsize) else {};
(changedeqns, contiEqn) = getChangedEqnsAndLowest(newsize, ass2, changedeqns, size);
ErrorExt.delCheckpoint("Pantelides");

if Flags.isSet(Flags.OPT_DAE_DUMP) then
print("Index reduction done.\n");
end if;
then (changedeqns, contiEqn, syst, shared, ass1, ass2, arg);

case {} equation
Error.addMessage(Error.INTERNAL_ERROR, {"- IndexReduction.pantelidesIndexReduction called with empty list of equations!"});
if Flags.isSet(Flags.OPT_DAE_DUMP) then
print("Index reduction done.\n");
end if;
then fail();

case _::_ equation
ErrorExt.delCheckpoint("Pantelides");
Error.addMessage(Error.INTERNAL_ERROR, {"- IndexReduction.pantelidesIndexReduction failed!"});
if Flags.isSet(Flags.OPT_DAE_DUMP) then
print("Index reduction done.\n");
end if;
then fail();
end matchcontinue;
end pantelidesIndexReduction;
Expand Down

0 comments on commit 0ed9bc8

Please sign in to comment.