Skip to content

Commit

Permalink
more functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Baunsgaard committed Jan 14, 2025
1 parent 661b186 commit 7bedb88
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import org.apache.sysds.runtime.compress.colgroup.indexes.IColIndex;
import org.apache.sysds.runtime.frame.data.columns.Array;
import org.apache.sysds.runtime.matrix.data.MatrixBlock;

/**
* Special sideways Compressed column group not supposed to be used outside of the compressed transform encode.
Expand All @@ -37,4 +38,16 @@ public ColGroupUncompressedArray(Array<?> data, int id, IColIndex colIndexes){
}


@Override
public int getNumValues(){
return array.size();
}


@Override
public long estimateInMemorySize(){
// not accurate estimate, but guaranteed larger.
return MatrixBlock.estimateSizeInMemory(array.size(),1,array.size()) + 80;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ else if(contiguous)
return ArrayIndex.estimateInMemorySizeStatic(nCol);
}

public static IColIndex combine(List<AColGroup> gs) {
public static IColIndex combine(List<? extends AColGroup> gs) {
int numCols = 0;
for(AColGroup g : gs)
numCols += g.getNumCols();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ private void combineUncompressed(CompressedMatrixBlock mb) {
}

private AColGroup combine(List<ColGroupUncompressedArray> ucg) {
IColIndex combinedCols = ColIndexFactory.combine(ucg);
throw new NotImplementedException("Should combine " + ucg.size());
}

Expand Down

0 comments on commit 7bedb88

Please sign in to comment.