You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemds.apache.org by mb...@apache.org on 2022/08/07 14:40:28 UTC

[systemds] branch main updated: [SYSTEMDS-3418] Fix block size handling replace operations

This is an automated email from the ASF dual-hosted git repository.

mboehm7 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/systemds.git


The following commit(s) were added to refs/heads/main by this push:
     new bc372e7a91 [SYSTEMDS-3418] Fix block size handling replace operations
bc372e7a91 is described below

commit bc372e7a91594bdfa356d0d9139893d8d6a15c98
Author: Matthias Boehm <mb...@gmail.com>
AuthorDate: Sun Aug 7 16:40:10 2022 +0200

    [SYSTEMDS-3418] Fix block size handling replace operations
    
    The recent fix of replace operations for large blocks introduced a bug
    taking the blockSize (number of rows per block) instead of the size of
    the black (number of cells per block) as loop bounds.
---
 src/main/java/org/apache/sysds/runtime/matrix/data/MatrixBlock.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sysds/runtime/matrix/data/MatrixBlock.java b/src/main/java/org/apache/sysds/runtime/matrix/data/MatrixBlock.java
index d06d5a4177..e2727b2c53 100644
--- a/src/main/java/org/apache/sysds/runtime/matrix/data/MatrixBlock.java
+++ b/src/main/java/org/apache/sysds/runtime/matrix/data/MatrixBlock.java
@@ -5275,7 +5275,7 @@ public class MatrixBlock extends MatrixValue implements CacheBlock, Externalizab
 			DenseBlock a = getDenseBlock();
 			DenseBlock c = ret.allocateDenseBlock().getDenseBlock();
 			for( int bi=0; bi<a.numBlocks(); bi++ ) {
-				int len = a.blockSize(bi);
+				int len = a.size(bi);
 				double[] avals = a.valuesAt(bi);
 				double[] cvals = c.valuesAt(bi);
 				for( int i=0; i<len; i++ ) {