This is an automated email from the ASF dual-hosted git repository. mboehm7 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/systemds.git
The following commit(s) were added to refs/heads/master by this push: new fac221d [SYSTEMDS-2665] Fix correctness ctable operator rexpand-rows fac221d is described below commit fac221d67c4be8f22e4cda022d3e76cba39f37da Author: Matthias Boehm <mboe...@gmail.com> AuthorDate: Tue Sep 15 23:56:05 2020 +0200 [SYSTEMDS-2665] Fix correctness ctable operator rexpand-rows This patch fixes a correctness issue of the special rexpand-rows operator as applied for the following slice finder expression map = table(ID, seq(1,nrow(P)), max(ID), nrow(P)). The cache-conscious implementation had an offset issue in case of ncol>blocksize (1024). The fix is a one-line modification though. --- .../java/org/apache/sysds/runtime/matrix/data/LibMatrixReorg.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/sysds/runtime/matrix/data/LibMatrixReorg.java b/src/main/java/org/apache/sysds/runtime/matrix/data/LibMatrixReorg.java index a9f8001..c4c3425 100644 --- a/src/main/java/org/apache/sysds/runtime/matrix/data/LibMatrixReorg.java +++ b/src/main/java/org/apache/sysds/runtime/matrix/data/LibMatrixReorg.java @@ -674,7 +674,7 @@ public class LibMatrixReorg if( rows ) ret.reset(lmax, in.rlen, true); else //cols - ret.reset(in.rlen, lmax, true); + ret.reset(in.rlen, lmax, true); return ret; } @@ -1994,10 +1994,11 @@ public class LibMatrixReorg //handle invalid values if not to be ignored if( !ignore && val<=0 ) throw new DMLRuntimeException("Invalid input value <= 0 for ignore=false: "+val); - + //set expanded value if matching + //note: tmpi populated with i+j indexes, then sorted if( val == Math.floor(val) && val >= 1 && val <= max ) - ret.appendValue((int)(val-1), i+tmpi[j], 1); + ret.appendValue((int)(val-1), tmpi[j], 1); } }