You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 18, 2019. It is now read-only.
Copy file name to clipboardExpand all lines: Compiler/NFFrontEnd/NFOperator.mo
+5-6Lines changed: 5 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -144,11 +144,10 @@ public
144
144
DAE.Type ty;
145
145
algorithm
146
146
ty :=Type.toDAE(op.ty);
147
-
148
147
daeOp := match op.op
149
-
caseOp.ADD then DAE.ADD(ty);
150
-
caseOp.SUB then DAE.SUB(ty);
151
-
caseOp.MUL then DAE.MUL(ty);
148
+
caseOp.ADD then ifType.isArray(op.ty) then DAE.ADD_ARR(ty) elseDAE.ADD(ty);
149
+
caseOp.SUB then ifType.isArray(op.ty) then DAE.SUB_ARR(ty) elseDAE.SUB(ty);
150
+
caseOp.MUL then ifType.isArray(op.ty) then DAE.MUL_ARR(ty) elseDAE.MUL(ty);
152
151
caseOp.DIV then DAE.DIV(ty);
153
152
caseOp.POW then DAE.POW(ty);
154
153
caseOp.ADD_SCALAR_ARRAY algorithm swapArguments :=true; then DAE.ADD_ARRAY_SCALAR(ty);
@@ -157,8 +156,8 @@ public
157
156
caseOp.SUB_ARRAY_SCALAR algorithm Error.addInternalError(getInstanceName() +": Don't know how to handle "+String(op.op), sourceInfo()); then DAE.SUB(ty);
158
157
caseOp.MUL_SCALAR_ARRAY algorithm swapArguments :=true; then DAE.MUL_ARRAY_SCALAR(ty);
159
158
caseOp.MUL_ARRAY_SCALAR then DAE.MUL_ARRAY_SCALAR(ty);
160
-
caseOp.MUL_VECTOR_MATRIXalgorithm Error.addInternalError(getInstanceName() +": Don't know how to handle "+String(op.op), sourceInfo()); then DAE.MUL(ty);
161
-
caseOp.MUL_MATRIX_VECTORalgorithm Error.addInternalError(getInstanceName() +": Don't know how to handle "+String(op.op), sourceInfo()); then DAE.MUL(ty);
159
+
caseOp.MUL_VECTOR_MATRIX then DAE.MUL_MATRIX_PRODUCT(ty);
160
+
caseOp.MUL_MATRIX_VECTOR then DAE.MUL_MATRIX_PRODUCT(ty);
162
161
caseOp.SCALAR_PRODUCT then DAE.MUL_SCALAR_PRODUCT(ty);
163
162
caseOp.MATRIX_PRODUCT then DAE.MUL_MATRIX_PRODUCT(ty);
164
163
caseOp.DIV_SCALAR_ARRAY then DAE.DIV_SCALAR_ARRAY(ty);
0 commit comments