Skip to content

Commit 504936e

Browse files
committed
decompress first
1 parent 02522a0 commit 504936e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/java/org/apache/sysds/runtime/compress/lib/CLALibRemoveEmpty.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ private static MatrixBlock rmEmptyRows(CompressedMatrixBlock in, MatrixBlock ret
7070
if(select == null)
7171
return fallback(in, true, emptyReturn, select, ret);
7272

73+
select = CompressedMatrixBlock.getUncompressed(select, "decompressing selection in rmempty");
74+
7375
int rOut = (int) select.getNonZeros();
7476
if(rOut == -1)
7577
rOut = (int) select.recomputeNonZeros();
@@ -81,8 +83,9 @@ private static MatrixBlock rmEmptyRows(CompressedMatrixBlock in, MatrixBlock ret
8183
// TODO: add optimization to avoid linear scan and make selectV indexes, if selection is small relative to number
8284
// of rows
8385
// TODO: add decompress to boolean vector.
84-
final boolean[] selectV = DataConverter
85-
.convertToBooleanVector(CompressedMatrixBlock.getUncompressed(select, "decompressing selection in rmempty"));
86+
final boolean[] selectV = DataConverter.convertToBooleanVector(select);
87+
88+
8689

8790
final List<AColGroup> inG = in.getColGroups();
8891
final List<AColGroup> retG = new ArrayList<>(inG.size());

0 commit comments

Comments
 (0)