Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 0a33707

Browse files
sjoelundOpenModelica-Hudson
authored andcommitted
Handle vectorization of matrix slightly better
This partially resolves ticket:2469. Code generation still does not fully work unless `-v=1` is used. Belonging to [master]: - #2018
1 parent b873818 commit 0a33707

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Compiler/FrontEnd/Static.mo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10988,6 +10988,7 @@ algorithm
1098810988
b1 = (ds < Config.vectorizationLimit());
1098910989
b2 = (ds2 < Config.vectorizationLimit());
1099010990
true = boolAnd(b1, b2) or Config.vectorizationLimit() == 0;
10991+
true = listEmpty(ComponentReference.crefLastSubs(cr));
1099110992
e = createCrefArray2d(cr, 1, ds, ds2, exptp, t,crefIdType);
1099210993
then
1099310994
e;

Compiler/SimCode/SimCodeMain.mo

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,7 @@ protected
556556
res := (false,{});
557557
try
558558
SimCodeUtil.resetFunctionIndex();
559+
SimCodeFunctionUtil.codegenResetTryThrowIndex();
559560
if Config.acceptMetaModelicaGrammar() or Flags.isSet(Flags.GEN_DEBUG_SYMBOLS) then
560561
Tpl.textFileConvertLines(Tpl.tplCallWithFailErrorNoArg(func), file);
561562
else
@@ -576,6 +577,7 @@ protected
576577
res := (false,{});
577578
try
578579
SimCodeUtil.resetFunctionIndex();
580+
SimCodeFunctionUtil.codegenResetTryThrowIndex();
579581
Tpl.tplCallWithFailErrorNoArg(func);
580582
res := (true,SimCodeUtil.getFunctionIndex());
581583
else
@@ -593,6 +595,7 @@ protected
593595
res := (false,{});
594596
try
595597
SimCodeUtil.resetFunctionIndex();
598+
SimCodeFunctionUtil.codegenResetTryThrowIndex();
596599
func();
597600
res := (true,SimCodeUtil.getFunctionIndex());
598601
else

0 commit comments

Comments
 (0)