public class ColGroupDDC1 extends ColGroupDDC
ColGroup.ColGroupRowIterator, ColGroup.CompressionType
_values, LOW_LEVEL_OPT, SORT_VALUES_BY_LENGTH
_colIndexes, _numRows
Constructor and Description |
---|
ColGroupDDC1() |
ColGroupDDC1(int[] colIndices,
int numRows,
double[] values,
byte[] data) |
ColGroupDDC1(int[] colIndices,
int numRows,
UncompressedBitmap ubm) |
Modifier and Type | Method and Description |
---|---|
static void |
computeRowSums(ColGroupDDC1[] grps,
MatrixBlock result,
org.apache.sysml.runtime.functionobjects.KahanFunction kplus,
int rl,
int ru) |
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 colpos)
Decompress to block.
|
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
|
protected int |
getCode(int r) |
ColGroup.CompressionType |
getCompType()
Obtain the compression type.
|
int[] |
getCounts(int[] counts) |
int[] |
getCounts(int rl,
int ru,
int[] counts) |
protected double |
getData(int r)
Generic get value for byte-length-agnostic access
to first column.
|
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(ColGroupDDC a,
MatrixBlock result) |
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 |
readFields(DataInput in,
boolean skipDict)
Deserializes column group from data input.
|
void |
recodeData(HashMap<Double,Integer> map) |
static void |
rightMultByVector(ColGroupDDC1[] grps,
MatrixBlock vector,
MatrixBlock result,
int rl,
int ru) |
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.
|
void |
write(DataOutput out,
boolean skipDict)
Serializes column group to data output.
|
computeColSums, computeRowMxx, decompressToBlock, get, getIterator, getRowIterator, postScaling, unaryAggregateOperations
allocDVector, allocIVector, applyScalarOp, applyScalarOp, cleanupThreadLocalMemory, computeColMxx, computeMxx, containsAllZeroValue, getCounts, getCounts, getCounts, getCountsAsBlock, getCountsAsBlock, getNumValues, getValue, getValues, getValuesAsBlock, getValuesSize, preaggValues, preaggValues, setupThreadLocalMemory, setValues, sumAllValues, sumAllValues, sumValues, sumValues, sumValues, sumValues, unaryAggregateOperations
getColIndex, getColIndices, getNumCols, getNumRows, shiftColIndices
public ColGroupDDC1()
public ColGroupDDC1(int[] colIndices, int numRows, UncompressedBitmap ubm)
public ColGroupDDC1(int[] colIndices, int numRows, double[] values, byte[] data)
public ColGroup.CompressionType getCompType()
ColGroup
getCompType
in class ColGroup
protected double getData(int r)
ColGroupDDC
getData
in class ColGroupDDC
r
- global row indexprotected 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 valueprotected int getCode(int r)
getCode
in class ColGroupDDC
public void write(DataOutput out) throws IOException
ColGroup
write
in class ColGroup
out
- data outputIOException
- if IOException occurspublic void write(DataOutput out, boolean skipDict) throws IOException
ColGroup
write
in class ColGroup
out
- data outputskipDict
- skip shared dictionaryIOException
- if IOException occurspublic void readFields(DataInput in) throws IOException
ColGroup
readFields
in class ColGroup
in
- data inputIOException
- if IOException occurspublic void readFields(DataInput in, boolean skipDict) throws IOException
ColGroup
readFields
in class ColGroup
in
- data inputskipDict
- skip shared dictionaryIOException
- 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 upperpublic void decompressToBlock(MatrixBlock target, int colpos)
ColGroup
decompressToBlock
in class ColGroupDDC
target
- dense output vectorcolpos
- column to decompress, error if larger or equal numColspublic int[] getCounts(int[] counts)
getCounts
in class ColGroupValue
public int[] getCounts(int rl, int ru, int[] counts)
getCounts
in class ColGroupValue
protected 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)
ColGroup
rightMultByVector
in class ColGroup
vector
- vector to multiply by (tall vector)result
- accumulator for holding the resultrl
- row lowerru
- row upper
if the internal SystemML code that performs the
multiplication experiences an errorpublic static void rightMultByVector(ColGroupDDC1[] grps, MatrixBlock vector, MatrixBlock result, int rl, int ru)
public void leftMultByRowVector(MatrixBlock vector, MatrixBlock result)
ColGroup
leftMultByRowVector
in class ColGroup
vector
- row vectorresult
- matrix block resultpublic void leftMultByRowVector(ColGroupDDC a, MatrixBlock result)
leftMultByRowVector
in class ColGroupValue
protected 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 static void computeRowSums(ColGroupDDC1[] grps, MatrixBlock result, org.apache.sysml.runtime.functionobjects.KahanFunction kplus, int rl, int ru)
public ColGroup scalarOperation(org.apache.sysml.runtime.matrix.operators.ScalarOperator op)
ColGroup
scalarOperation
in class ColGroup
op
- operation to performCopyright © 2018 The Apache Software Foundation. All rights reserved.