public class ColGroupOLE extends ColGroupOffset
ColGroup.CompressionType| Modifier and Type | Method and Description |
|---|---|
void |
countNonZerosPerRow(int[] rnnz,
int rl,
int ru)
Count the number of non-zeros per row
|
void |
decompressToBlock(MatrixBlock target,
int colpos)
Decompress to block.
|
void |
decompressToBlock(MatrixBlock target,
int[] colixTargets)
Decompress the contents of this column group into uncompressed packed columns
|
void |
decompressToBlock(MatrixBlock target,
int rl,
int ru)
Decompress the contents of this column group into the specified full matrix block.
|
long |
estimateInMemorySize()
Note: Must be overridden by child classes to account for additional data and metadata
|
static char[] |
genOffsetBitmap(int[] offsets,
int len)
Encodes the bitmap in blocks of offsets.
|
ColGroup.CompressionType |
getCompType()
Obtain the compression type.
|
int[] |
getCounts(int[] counts) |
int[] |
getCounts(int rl,
int ru,
int[] counts) |
long |
getExactSizeOnDisk()
Returns the exact serialized size of column group.
|
Iterator<Integer> |
getIterator(int k) |
Iterator<Integer> |
getIterator(int k,
int rl,
int ru) |
org.apache.sysds.runtime.compress.colgroup.ColGroup.ColGroupRowIterator |
getRowIterator(int rl,
int ru)
Create a dense row iterator for a row index range.
|
void |
leftMultByMatrix(double[] a,
double[] c,
int numVals,
double[] values,
int numRows,
int numCols,
int rl,
int ru,
int voff)
Multiply the slice of the matrix that this column group represents by a row vector on the left (the original
column vector is assumed to be transposed already i.e.
|
void |
leftMultByRowVector(double[] a,
double[] c,
int numVals)
Multiply the slice of the matrix that this column group represents by a row vector on the left (the original
column vector is assumed to be transposed already i.e.
|
void |
leftMultByRowVector(double[] a,
double[] c,
int numVals,
double[] values)
Multiply the slice of the matrix that this column group represents by a row vector on the left (the original
column vector is assumed to be transposed already i.e.
|
void |
readFields(DataInput in)
Deserialize column group from data input.
|
void |
rightMultByMatrix(double[] matrix,
double[] result,
int numVals,
double[] values,
int rl,
int ru,
int vOff) |
void |
rightMultByVector(double[] b,
double[] c,
int rl,
int ru,
double[] dictVals)
Multiply the slice of the matrix that this column group represents by a vector on the right.
|
ColGroup |
scalarOperation(ScalarOperator op)
Perform the specified scalar operation directly on the compressed column group, without decompressing individual
cells if possible.
|
String |
toString() |
void |
write(DataOutput out)
Serializes column group to data output.
|
get, getBitmapOffsets, getBitmaps, getIterator, hasZeroscleanupThreadLocalMemory, getByteValues, getCounts, getCounts, getIfCountsType, getNumValues, getValues, getValuesAsBlock, isLossy, setupThreadLocalMemory, unaryAggregateOperations, unaryAggregateOperationsgetColIndex, getColIndices, getNumCols, getNumRows, shiftColIndicespublic ColGroup.CompressionType getCompType()
ColGroupgetCompType in class ColGrouppublic void decompressToBlock(MatrixBlock target, int rl, int ru)
ColGroupdecompressToBlock in class ColGroupOffsettarget - a matrix block where the columns covered by this column group have not yet been filled in.rl - row lowerru - row upperpublic void decompressToBlock(MatrixBlock target, int[] colixTargets)
ColGroupdecompressToBlock in class ColGroupOffsettarget - a dense matrix block. The block must have enough space to hold the contents of this column
group.colixTargets - array that maps column indices in the original matrix block to columns of target.public void decompressToBlock(MatrixBlock target, int colpos)
ColGroupdecompressToBlock in class ColGroupOffsettarget - dense output vectorcolpos - column to decompress, error if larger or equal numColspublic int[] getCounts(int[] counts)
getCounts in class ColGroupValuepublic int[] getCounts(int rl,
int ru,
int[] counts)
getCounts in class ColGroupValuepublic long estimateInMemorySize()
ColGroupestimateInMemorySize in class ColGroupOffsetpublic ColGroup scalarOperation(ScalarOperator op)
ColGroupscalarOperation in class ColGroupop - operation to performpublic void rightMultByVector(double[] b,
double[] c,
int rl,
int ru,
double[] dictVals)
ColGrouprightMultByVector in class ColGroupb - vector to multiply by (tall vector)c - accumulator for holding the resultrl - row lowerru - row upper if the internal SystemML code that performs the multiplication experiences an errordictVals - The dictionary values materializedpublic void rightMultByMatrix(double[] matrix,
double[] result,
int numVals,
double[] values,
int rl,
int ru,
int vOff)
rightMultByMatrix in class ColGrouppublic void leftMultByRowVector(double[] a,
double[] c,
int numVals)
ColGroupleftMultByRowVector in class ColGroupa - row vectorc - matrix block resultnumVals - The Number of values contained in the Column.public void leftMultByRowVector(double[] a,
double[] c,
int numVals,
double[] values)
ColGroupleftMultByRowVector in class ColGroupa - row vectorc - matrix block resultnumVals - The Number of values contained in the Column.values - The materialized list of values contained in the dictionary.public void leftMultByMatrix(double[] a,
double[] c,
int numVals,
double[] values,
int numRows,
int numCols,
int rl,
int ru,
int voff)
ColGroupleftMultByMatrix in class ColGroupa - matrix to left multiplyc - matrix block resultnumVals - The Number of values contained in the Column.values - The materialized list of values contained in the dictionary.numRows - The number of rows in the matrix inputnumCols - The number of columns in the colGroups parent matrix.rl - The row to start the matrix multiplication fromru - The row to stop the matrix multiplication at.voff - The offset into the first argument matrix to start at.public void countNonZerosPerRow(int[] rnnz,
int rl,
int ru)
ColGroupcountNonZerosPerRow in class ColGrouprnnz - non-zeros per rowrl - row lower bound, inclusiveru - row upper bound, exclusivepublic void readFields(DataInput in) throws IOException
ColGroupreadFields in class ColGroupOffsetin - data inputIOException - if IOException occurspublic void write(DataOutput out) throws IOException
ColGroupwrite in class ColGroupOffsetout - data outputIOException - if IOException occurspublic long getExactSizeOnDisk()
ColGroupgetExactSizeOnDisk in class ColGroupOffsetpublic Iterator<Integer> getIterator(int k)
getIterator in class ColGroupOffsetk - index of value tuple with associated bitmappublic Iterator<Integer> getIterator(int k, int rl, int ru)
getIterator in class ColGroupOffsetk - index of value tuple with associated bitmaprl - row lower index, inclusiveru - row upper index, exclusivepublic org.apache.sysds.runtime.compress.colgroup.ColGroup.ColGroupRowIterator getRowIterator(int rl,
int ru)
ColGroupgetRowIterator in class ColGrouprl - row lower index, inclusiveru - row upper index, exclusivepublic String toString()
toString in class ColGroupOffsetpublic static char[] genOffsetBitmap(int[] offsets,
int len)
offsets - uncompressed offset listlen - logical length of the given offset listCopyright © 2020 The Apache Software Foundation. All rights reserved.