Skip to content

Commit 1a75704

Browse files
committed
adjust templates, so that DIV for scalarVector works
1 parent 1eb446e commit 1a75704

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/org/apache/sysds/hops/codegen/cplan/CNodeBinary.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ private CNode getIntermediateInputVector() {
289289
public boolean getOutputType(boolean scalarVector, boolean lsparseLhs, boolean lsparseRhs) {
290290
switch(_type) {
291291
case VECT_MULT_SCALAR:
292-
case VECT_DIV_SCALAR:
293292
case VECT_POW_SCALAR: return !scalarVector && lsparseLhs;
293+
case VECT_DIV_SCALAR:
294294
case VECT_XOR_SCALAR:
295295
case VECT_MIN_SCALAR:
296296
case VECT_MAX_SCALAR:

src/main/java/org/apache/sysds/hops/codegen/cplan/java/Binary.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ public String getTemplate(BinType type, boolean sparseLhs, boolean sparseRhs,
7070

7171
//vector-scalar operations
7272
case VECT_MULT_SCALAR:
73-
case VECT_DIV_SCALAR:
7473
case VECT_POW_SCALAR: {
7574
String vectName = type.getVectorPrimitiveName();
7675
if( scalarVector )
@@ -84,6 +83,7 @@ else if(DMLScript.SPARSE_INTERMEDIATE) {
8483
" double[] %TMP% = LibSpoofPrimitives.vect"+vectName+"Write(%IN1%, %IN2%, %POS1%, %LEN%);\n";
8584
}
8685
}
86+
case VECT_DIV_SCALAR:
8787
case VECT_XOR_SCALAR:
8888
case VECT_MIN_SCALAR:
8989
case VECT_MAX_SCALAR:

0 commit comments

Comments
 (0)