Skip to content

Commit

Permalink
dont order partitions if there are none
Browse files Browse the repository at this point in the history
  • Loading branch information
vwaurich authored and OpenModelica-Hudson committed May 4, 2017
1 parent 3a94441 commit 398f563
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions Compiler/BackEnd/SynchronousFeatures.mo
Expand Up @@ -673,15 +673,16 @@ algorithm
fail();
end if;

//order the partitions according to their causality order and corresponding subclock order
outSysts_noOrder := arrayCreate(listLength(outSysts), listHead(outSysts));
for i in List.intRange(arrayLength(order)) loop
outSys := listGet(outSysts,i);
outSys.partitionKind := BackendDAE.CLOCKED_PARTITION(order[i] + off);
arrayUpdate(outSysts_noOrder, order[i], outSys);
end for;
//(outSysts, _) := List.map2Fold(outSysts, makeClockedSyst, order, off, 1);
outSysts := arrayList(outSysts_noOrder);
if (not listEmpty(outSysts)) then
//order the partitions according to their causality order and corresponding subclock order
outSysts_noOrder := arrayCreate(listLength(outSysts), listHead(outSysts));
for i in List.intRange(arrayLength(order)) loop
outSys := listGet(outSysts,i);
outSys.partitionKind := BackendDAE.CLOCKED_PARTITION(order[i] + off);
arrayUpdate(outSysts_noOrder, order[i], outSys);
end for;
outSysts := arrayList(outSysts_noOrder);
end if;

outSubClocks := {};
subclocksOutArr := arrayCopy(subclocks);
Expand Down

0 comments on commit 398f563

Please sign in to comment.