Skip to content

Commit

Permalink
Fix NULL variable bug
Browse files Browse the repository at this point in the history
  • Loading branch information
carabolic committed May 2, 2016
1 parent faa454a commit 45845ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/main/java/org/apache/sysml/hops/BinaryOp.java
Original file line number Diff line number Diff line change
Expand Up @@ -1543,10 +1543,9 @@ private MMBinaryMethod optFindMMBinaryMethodFlink(Hop left, Hop right) {
||(m1_dim1 >= 1 && m2_dim1 == 1 )) ) //rhs row vector
{
double size = OptimizerUtils.estimateSize(m2_dim1, m2_dim2);
/*
if( OptimizerUtils.checkSparkBroadcastMemoryBudget(size) ) { //TODO: check this
if( OptimizerUtils.checkFlinkBroadcastMemoryBudget(size) ) { //TODO: check this
return MMBinaryMethod.MR_BINARY_M;
}*/
}
}

//MR_BINARY_R as robust fallback strategy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public Tuple2<MatrixIndexes, MatrixBlock> map(Tuple2<MatrixIndexes, MatrixBlock>
throws Exception
{
//get the rhs block
int rix= (int)((_vtype==VectorType.COL_VECTOR) ? arg0.f0.getRowIndex() : 1);
int cix= (int)((_vtype==VectorType.COL_VECTOR) ? 1 : arg0.f0.getColumnIndex());
long rix= ((_vtype==VectorType.COL_VECTOR) ? arg0.f0.getRowIndex() : 1L);
long cix= ((_vtype==VectorType.COL_VECTOR) ? 1L : arg0.f0.getColumnIndex());
MatrixBlock in2 = _pmV.get(rix).get(cix);

//execute the binary operation
Expand Down

0 comments on commit 45845ef

Please sign in to comment.