Repository: systemml Updated Branches: refs/heads/master 2ca62e34b -> 5fcda00a9
[MINOR] Fix robustness of mr aggregation code path (valid dims) Project: http://git-wip-us.apache.org/repos/asf/systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/5fcda00a Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/5fcda00a Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/5fcda00a Branch: refs/heads/master Commit: 5fcda00a9c2b02bddc3190b353300ddb10d356b0 Parents: 2ca62e3 Author: Matthias Boehm <[email protected]> Authored: Sun Feb 11 11:34:32 2018 -0800 Committer: Matthias Boehm <[email protected]> Committed: Sun Feb 11 11:34:32 2018 -0800 ---------------------------------------------------------------------- .../sysml/runtime/matrix/data/OperationsOnMatrixValues.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/systemml/blob/5fcda00a/src/main/java/org/apache/sysml/runtime/matrix/data/OperationsOnMatrixValues.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/OperationsOnMatrixValues.java b/src/main/java/org/apache/sysml/runtime/matrix/data/OperationsOnMatrixValues.java index c11688e..a5e1d7b 100644 --- a/src/main/java/org/apache/sysml/runtime/matrix/data/OperationsOnMatrixValues.java +++ b/src/main/java/org/apache/sysml/runtime/matrix/data/OperationsOnMatrixValues.java @@ -197,14 +197,13 @@ public class OperationsOnMatrixValues //set initial values according to operator if(op.initialValue==0) { - valueOut.reset(outRow, outCol, sparseHint); - correction.reset(corRow, corCol, false); + valueOut.reset(Math.max(outRow,0), Math.max(outCol,0), sparseHint); + correction.reset(Math.max(corRow,0), Math.max(corCol,0), false); } else { - valueOut.reset(outRow, outCol, op.initialValue); - correction.reset(corRow, corCol, op.initialValue); + valueOut.reset(Math.max(outRow, 0), Math.max(outCol,0), op.initialValue); + correction.reset(Math.max(corRow,0), Math.max(corCol,0), op.initialValue); } - } else {
