Skip to content

Commit badd734

Browse files
committed
Add forceScalarize debug flag
1 parent 0f0f06c commit badd734

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

OMCompiler/Compiler/NFFrontEnd/NFInst.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ end instClassForConnection;
320320
function resetGlobalFlags
321321
"Resets the global flags that the frontend uses."
322322
algorithm
323-
if Flags.getConfigBool(Flags.NEW_BACKEND) then
323+
if Flags.getConfigBool(Flags.NEW_BACKEND) and not Flags.isSet(Flags.FORCE_SCALARIZE) then
324324
FlagsUtil.set(Flags.NF_SCALARIZE, false);
325325
FlagsUtil.set(Flags.VECTORIZE_BINDINGS, true);
326326
end if;

OMCompiler/Compiler/Util/Flags.mo

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,8 @@ constant DebugFlag DUMP_RESIZABLE = DEBUG_FLAG(194, "dumpResizable", false,
553553
Gettext.gettext("Dumps information about resizable paremeter handling."));
554554
constant DebugFlag DUMP_SOLVE = DEBUG_FLAG(195, "dumpSolve", false,
555555
Gettext.gettext("Dumps information about equation solving."));
556+
constant DebugFlag FORCE_SCALARIZE = DEBUG_FLAG(196, "forceScalarize", false,
557+
Gettext.gettext("Forces scalarization to be done when it would normally be automatically disabled."));
556558

557559
public
558560
// CONFIGURATION FLAGS

OMCompiler/Compiler/Util/FlagsUtil.mo

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ constant list<Flags.DebugFlag> allDebugFlags = {
251251
Flags.VECTORIZE_BINDINGS,
252252
Flags.DUMP_EVENTS,
253253
Flags.DUMP_RESIZABLE,
254-
Flags.DUMP_SOLVE
254+
Flags.DUMP_SOLVE,
255+
Flags.FORCE_SCALARIZE
255256
};
256257

257258
protected

0 commit comments

Comments
 (0)