Skip to content

Commit

Permalink
st
Browse files Browse the repository at this point in the history
  • Loading branch information
Baunsgaard committed Aug 30, 2023
1 parent 296137b commit 182accc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,11 @@ public CompressedMatrixBlock updateAndEncode(MatrixBlock mb, int k) {
validateInput(mb);

boolean transposed = false;
if(mb.getSparsity() < 0.1){
if(mb.getSparsity() < 0.1) {
transposed = true;
mb = LibMatrixReorg.transpose(mb, k, true);
}


final ExecutorService pool = CommonThreadPool.get(k);
try {
final int nCol = mb.getNumColumns();
Expand Down Expand Up @@ -219,9 +218,15 @@ public CompressedMatrixBlock updateAndEncode(MatrixBlock mb) {
validateInput(mb);

List<AColGroup> ret = new ArrayList<>(encodings.length);
boolean transposed = false;
if(mb.getSparsity() < 0.1) {
transposed = true;
mb = LibMatrixReorg.transpose(mb, 1 , true);
}

for(int i = 0; i < encodings.length; i++) {
Pair<ICLAScheme, AColGroup> p = encodings[i].updateAndEncode(mb);
ICLAScheme e = encodings[i];
Pair<ICLAScheme, AColGroup> p = transposed ? e.updateAndEncodeT(mb): e.updateAndEncode(mb);
encodings[i] = p.getKey();
ret.add(p.getValue());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import org.apache.sysds.runtime.compress.estim.CompressedSizeInfo;
import org.apache.sysds.runtime.compress.estim.CompressedSizeInfoColGroup;
import org.apache.sysds.runtime.matrix.data.MatrixBlock;
import org.apache.sysds.test.TestUtils;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
Expand Down

0 comments on commit 182accc

Please sign in to comment.