public class ColGroupDDC2 extends ColGroupDDC
ColGroup.CompressionType
_values, LOW_LEVEL_OPT, SORT_VALUES_BY_LENGTH
_colIndexes, _numRows
Constructor and Description |
---|
ColGroupDDC2() |
ColGroupDDC2(int[] colIndices,
int numRows,
double[] values,
char[] data) |
ColGroupDDC2(int[] colIndices,
int numRows,
UncompressedBitmap ubm) |
Modifier and Type | Method and Description |
---|---|
protected void |
computeRowSums(MatrixBlock result,
org.apache.sysml.runtime.functionobjects.KahanFunction kplus,
int rl,
int ru) |
protected void |
computeSum(MatrixBlock result,
org.apache.sysml.runtime.functionobjects.KahanFunction kplus) |
protected void |
countNonZerosPerRow(int[] rnnz,
int rl,
int ru)
Count the number of non-zeros per row
|
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
|
ColGroup.CompressionType |
getCompType()
Obtain the compression type.
|
protected double |
getData(int r,
int colIx)
Generic get value for byte-length-agnostic access.
|
long |
getExactSizeOnDisk()
Returns the exact serialized size of column group.
|
void |
leftMultByRowVector(MatrixBlock vector,
MatrixBlock result)
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)
Deserializes column group from data input.
|
void |
rightMultByVector(MatrixBlock vector,
MatrixBlock result,
int rl,
int ru)
Multiply the slice of the matrix that this column group represents by a
vector on the right.
|
ColGroup |
scalarOperation(org.apache.sysml.runtime.matrix.operators.ScalarOperator op)
Perform the specified scalar operation directly on the compressed column
group, without decompressing individual cells if possible.
|
protected void |
setData(int r,
int code)
Generic set value for byte-length-agnostic write
of encoded value.
|
void |
write(DataOutput out)
Serializes column group to data output.
|
computeColSums, computeRowMxx, decompressToBlock, decompressToBlock, get, unaryAggregateOperations
applyScalarOp, applyScalarOp, computeColMxx, computeMxx, containsAllZeroValue, getNumValues, getValues, preaggValues, sumAllValues, sumValues, sumValues, sumValues, unaryAggregateOperations
getColIndex, getColIndices, getNumCols, getNumRows, shiftColIndices
public ColGroupDDC2()
public ColGroupDDC2(int[] colIndices, int numRows, UncompressedBitmap ubm)
public ColGroupDDC2(int[] colIndices, int numRows, double[] values, char[] data)
public ColGroup.CompressionType getCompType()
ColGroup
getCompType
in class ColGroup
protected double getData(int r, int colIx)
ColGroupDDC
getData
in class ColGroupDDC
r
- global row indexcolIx
- local column indexprotected void setData(int r, int code)
ColGroupDDC
setData
in class ColGroupDDC
r
- global row indexcode
- encoded valuepublic void write(DataOutput out) throws IOException
ColGroup
write
in class ColGroup
out
- data outputIOException
- if IOException occurspublic void readFields(DataInput in) throws IOException
ColGroup
readFields
in class ColGroup
in
- data inputIOException
- if IOException occurspublic long getExactSizeOnDisk()
ColGroup
getExactSizeOnDisk
in class ColGroup
public long estimateInMemorySize()
ColGroup
estimateInMemorySize
in class ColGroupDDC
public void decompressToBlock(MatrixBlock target, int rl, int ru)
ColGroup
decompressToBlock
in class ColGroupDDC
target
- a matrix block where the columns covered by this column group
have not yet been filled in.rl
- row lowerru
- row upperprotected void countNonZerosPerRow(int[] rnnz, int rl, int ru)
ColGroup
countNonZerosPerRow
in class ColGroupDDC
rnnz
- non-zeros per rowrl
- row lower bound, inclusiveru
- row upper bound, exclusivepublic void rightMultByVector(MatrixBlock vector, MatrixBlock result, int rl, int ru) throws DMLRuntimeException
ColGroup
rightMultByVector
in class ColGroup
vector
- vector to multiply by (tall vector)result
- accumulator for holding the resultrl
- row lowerru
- row upperDMLRuntimeException
- if the internal SystemML code that performs the
multiplication experiences an errorpublic void leftMultByRowVector(MatrixBlock vector, MatrixBlock result) throws DMLRuntimeException
ColGroup
leftMultByRowVector
in class ColGroup
vector
- row vectorresult
- matrix block resultDMLRuntimeException
- if DMLRuntimeException occursprotected void computeSum(MatrixBlock result, org.apache.sysml.runtime.functionobjects.KahanFunction kplus)
computeSum
in class ColGroupDDC
protected void computeRowSums(MatrixBlock result, org.apache.sysml.runtime.functionobjects.KahanFunction kplus, int rl, int ru)
computeRowSums
in class ColGroupDDC
public ColGroup scalarOperation(org.apache.sysml.runtime.matrix.operators.ScalarOperator op) throws DMLRuntimeException
ColGroup
scalarOperation
in class ColGroup
op
- operation to performDMLRuntimeException
- if DMLRuntimeException occursCopyright © 2017 The Apache Software Foundation. All rights reserved.