Skip to content

Commit

Permalink
Do not expand slices in NF if targeting CPP runtime. (#8356)
Browse files Browse the repository at this point in the history
  - This is not desired for the CPP runtime for now.
  • Loading branch information
mahge committed Dec 22, 2021
1 parent 3e19760 commit 8713a81
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion OMCompiler/Compiler/NFFrontEnd/NFInst.mo
Expand Up @@ -64,6 +64,7 @@ import Algorithm = NFAlgorithm;
import InstContext = NFInstContext;

protected
import Config;
import Array;
import Error;
import FlagsUtil;
Expand Down Expand Up @@ -206,7 +207,11 @@ algorithm
InstUtil.dumpFlatModelDebug("scalarize", flatModel, functions);

VerifyModel.verify(flatModel);
(flatModel, functions) := InstUtil.expandSlicedCrefs(flatModel, functions);

if not Config.simCodeTarget() == "Cpp" and not Config.simCodeTarget() == "omsicpp" then
(flatModel, functions) := InstUtil.expandSlicedCrefs(flatModel, functions);
end if;

flatModel := InstUtil.combineSubscripts(flatModel);

//(var_count, eq_count) := CheckModel.checkModel(flatModel);
Expand Down

0 comments on commit 8713a81

Please sign in to comment.