Class AMorphingMMColGroup
- java.lang.Object
-
- org.apache.sysds.runtime.compress.colgroup.AColGroup
-
- org.apache.sysds.runtime.compress.colgroup.AColGroupCompressed
-
- org.apache.sysds.runtime.compress.colgroup.ADictBasedColGroup
-
- org.apache.sysds.runtime.compress.colgroup.AColGroupValue
-
- org.apache.sysds.runtime.compress.colgroup.AMorphingMMColGroup
-
- All Implemented Interfaces:
Serializable
,IContainADictionary
- Direct Known Subclasses:
ASDC
,ColGroupDDCFOR
public abstract class AMorphingMMColGroup extends AColGroupValue
Abstract class for column group types that do not perform matrix Multiplication, and decompression for performance reasons but instead transforms into another type of column group type to perform that operation.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.sysds.runtime.compress.colgroup.AColGroup
AColGroup.CompressionType
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract AColGroup
extractCommon(double[] constV)
extract common value from group and return non morphing groupabstract double[]
getCommon()
Get common vector, note this should not materialize anything but simply point to things that are already allocated.void
leftMultByAColGroup(AColGroup lhs, MatrixBlock result, int nRows)
Left side matrix multiplication with a column group that is transposed.void
leftMultByMatrixNoPreAgg(MatrixBlock matrix, MatrixBlock result, int rl, int ru, int cl, int cu)
Left multiply with this column group.void
tsmmAColGroup(AColGroup other, MatrixBlock result)
Matrix multiply with this other column group, but: 1.-
Methods inherited from class org.apache.sysds.runtime.compress.colgroup.AColGroupValue
centralMoment, clear, computeColSums, estimateInMemorySize, getCounts, getNumberNonZeros, getNumValues, replace, rexpandCols, toString
-
Methods inherited from class org.apache.sysds.runtime.compress.colgroup.ADictBasedColGroup
copyAndSet, copyAndSet, decompressToDenseBlock, decompressToSparseBlock, getDictionary, getExactSizeOnDisk, rightMultByMatrix, write
-
Methods inherited from class org.apache.sysds.runtime.compress.colgroup.AColGroupCompressed
getMax, getMin, getSum, isEmpty, preAggRows, sameIndexStructure, tsmm, unaryAggregateOperations, unaryAggregateOperations
-
Methods inherited from class org.apache.sysds.runtime.compress.colgroup.AColGroup
addVector, append, appendN, binaryRowOpLeft, binaryRowOpRight, colSum, combine, containsValue, decompressToDenseBlock, decompressToSparseBlock, get, getColIndices, getCompressionInfo, getCompressionScheme, getCompType, getCost, getEncoding, getIdx, getNumCols, morph, recompress, rightMultByMatrix, scalarOperation, shiftColIndices, sliceColumn, sliceColumns, sliceRows, sortColumnIndexes, unaryOperation
-
-
-
-
Method Detail
-
leftMultByMatrixNoPreAgg
public final void leftMultByMatrixNoPreAgg(MatrixBlock matrix, MatrixBlock result, int rl, int ru, int cl, int cu)
Description copied from class:AColGroup
Left multiply with this column group.- Specified by:
leftMultByMatrixNoPreAgg
in classAColGroup
- Parameters:
matrix
- The matrix to multiply with on the leftresult
- The result to output the values into, always dense for the purpose of the column groups parallelizingrl
- The row to begin the multiplication from on the lhs matrixru
- The row to end the multiplication at on the lhs matrixcl
- The column to begin the multiplication from on the lhs matrixcu
- The column to end the multiplication at on the lhs matrix
-
leftMultByAColGroup
public final void leftMultByAColGroup(AColGroup lhs, MatrixBlock result, int nRows)
Description copied from class:AColGroup
Left side matrix multiplication with a column group that is transposed.- Specified by:
leftMultByAColGroup
in classAColGroup
- Parameters:
lhs
- The left hand side Column group to multiply with, the left hand side should be considered transposed. Also it should be guaranteed that this column group is not empty.result
- The result matrix to insert the result of the multiplication intonRows
- Number of rows in the lhs colGroup
-
tsmmAColGroup
public final void tsmmAColGroup(AColGroup other, MatrixBlock result)
Description copied from class:AColGroup
Matrix multiply with this other column group, but: 1. Only output upper triangle values. 2. Multiply both ways with "this" being on the left and on the right. It should be guaranteed that the input is not the same as the caller of the method. The second step is achievable by treating the initial multiplied matrix, and adding its values to the correct locations in the output.- Specified by:
tsmmAColGroup
in classAColGroup
- Parameters:
other
- The other Column group to multiply withresult
- The result matrix to put the results into
-
extractCommon
public abstract AColGroup extractCommon(double[] constV)
extract common value from group and return non morphing group- Parameters:
constV
- a vector to contain all values, note length = nCols in total matrix.- Returns:
- A non morphing column group with decompression instructions.
-
getCommon
public abstract double[] getCommon()
Get common vector, note this should not materialize anything but simply point to things that are already allocated.- Returns:
- the common double vector
-
-