Repository: incubator-systemml Updated Branches: refs/heads/master f5b78a322 -> a2c1e7597
[MINOR] Fix codegen multi-aggregate min/max result initialization This patch fixes an issue of proper min/max result initialization for the case of multi-threaded execution, which was not caught by the testsuite before because multi-threading is only applied for inputs w/ >1M cells. Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/a2c1e759 Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/a2c1e759 Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/a2c1e759 Branch: refs/heads/master Commit: a2c1e75975674f7f2093f6465b8c913565addca8 Parents: f5b78a3 Author: Matthias Boehm <[email protected]> Authored: Wed Apr 12 22:29:47 2017 -0700 Committer: Matthias Boehm <[email protected]> Committed: Wed Apr 12 22:29:47 2017 -0700 ---------------------------------------------------------------------- .../org/apache/sysml/runtime/codegen/SpoofMultiAggregate.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/a2c1e759/src/main/java/org/apache/sysml/runtime/codegen/SpoofMultiAggregate.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/codegen/SpoofMultiAggregate.java b/src/main/java/org/apache/sysml/runtime/codegen/SpoofMultiAggregate.java index 081e805..0de4916 100644 --- a/src/main/java/org/apache/sysml/runtime/codegen/SpoofMultiAggregate.java +++ b/src/main/java/org/apache/sysml/runtime/codegen/SpoofMultiAggregate.java @@ -85,7 +85,8 @@ public abstract class SpoofMultiAggregate extends SpoofOperator implements Seria out.reset(1, _aggOps.length, false); out.allocateDenseBlock(); double[] c = out.getDenseBlock(); - + setInitialOutputValues(c); + //input preparation double[][] b = prepInputMatrices(inputs); double[] scalars = prepInputScalars(scalarObjects); @@ -94,7 +95,6 @@ public abstract class SpoofMultiAggregate extends SpoofOperator implements Seria if( k <= 1 ) //SINGLE-THREADED { - setInitialOutputValues(c); if( !inputs.get(0).isInSparseFormat() ) executeDense(inputs.get(0).getDenseBlock(), b, scalars, c, m, n, 0, m); else
