Skip to content

Commit 7bedb88

Browse files
committed
more functions
1 parent 661b186 commit 7bedb88

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

src/main/java/org/apache/sysds/runtime/compress/colgroup/ColGroupUncompressedArray.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
import org.apache.sysds.runtime.compress.colgroup.indexes.IColIndex;
2323
import org.apache.sysds.runtime.frame.data.columns.Array;
24+
import org.apache.sysds.runtime.matrix.data.MatrixBlock;
2425

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

3940

41+
@Override
42+
public int getNumValues(){
43+
return array.size();
44+
}
45+
46+
47+
@Override
48+
public long estimateInMemorySize(){
49+
// not accurate estimate, but guaranteed larger.
50+
return MatrixBlock.estimateSizeInMemory(array.size(),1,array.size()) + 80;
51+
}
52+
4053
}

src/main/java/org/apache/sysds/runtime/compress/colgroup/indexes/ColIndexFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ else if(contiguous)
126126
return ArrayIndex.estimateInMemorySizeStatic(nCol);
127127
}
128128

129-
public static IColIndex combine(List<AColGroup> gs) {
129+
public static IColIndex combine(List<? extends AColGroup> gs) {
130130
int numCols = 0;
131131
for(AColGroup g : gs)
132132
numCols += g.getNumCols();

src/main/java/org/apache/sysds/runtime/transform/encode/CompressedEncode.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,7 @@ private void combineUncompressed(CompressedMatrixBlock mb) {
620620
}
621621

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

0 commit comments

Comments
 (0)