public class ColGroupOLE extends ColGroupOffset
ColGroupOffset.OffsetRowIterator, ColGroupOffset.OffsetValueIterator, ColGroupOffset.ZeroValueIterator
ColGroup.ColGroupRowIterator, ColGroup.CompressionType
_data, _ptr, _skiplist, _zeros, ALLOW_CACHE_CONSCIOUS_ROWSUMS, CREATE_SKIPLIST, READ_CACHE_BLKSZ, WRITE_CACHE_BLKSZ
_values, LOW_LEVEL_OPT, SORT_VALUES_BY_LENGTH
_colIndexes, _numRows
Constructor and Description |
---|
ColGroupOLE() |
ColGroupOLE(int[] colIndices,
int numRows,
boolean zeros,
double[] values,
char[] bitmaps,
int[] bitmapOffs) |
ColGroupOLE(int[] colIndices,
int numRows,
UncompressedBitmap ubm)
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
computeColSums(MatrixBlock result,
org.apache.sysml.runtime.functionobjects.KahanFunction kplus) |
protected void |
computeRowMxx(MatrixBlock result,
org.apache.sysml.runtime.functionobjects.Builtin builtin,
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 boolean[] |
computeZeroIndicatorVector()
Utility function of sparse-unsafe operations.
|
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[] 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.
|
ColGroup.CompressionType |
getCompType()
Obtain the compression type.
|
int[] |
getCounts(int[] counts) |
int[] |
getCounts(int rl,
int ru,
int[] counts) |
Iterator<Integer> |
getIterator(int k) |
Iterator<Integer> |
getIterator(int k,
int rl,
int ru) |
ColGroup.ColGroupRowIterator |
getRowIterator(int rl,
int ru)
Create a dense row iterator for a row index range.
|
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 |
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.
|
computeOffsets, createCompressedBitmaps, estimateInMemorySize, get, getBitmapOffsets, getBitmaps, getExactSizeOnDisk, getIterator, hasZeros, len, mxxValues, readFields, sumAllValues, unaryAggregateOperations, write
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, readFields, shiftColIndices, write
public ColGroupOLE()
public ColGroupOLE(int[] colIndices, int numRows, UncompressedBitmap ubm)
colIndices
- indices (within the block) of the columns included in this
columnnumRows
- total number of rows in the parent blockubm
- Uncompressed bitmap representation of the blockpublic ColGroupOLE(int[] colIndices, int numRows, boolean zeros, double[] values, char[] bitmaps, int[] bitmapOffs)
public ColGroup.CompressionType getCompType()
ColGroup
getCompType
in class ColGroup
public void decompressToBlock(MatrixBlock target, int rl, int ru)
ColGroup
decompressToBlock
in class ColGroupOffset
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[] colixTargets)
ColGroup
decompressToBlock
in class ColGroupOffset
target
- 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)
ColGroup
decompressToBlock
in class ColGroupOffset
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
public ColGroup scalarOperation(org.apache.sysml.runtime.matrix.operators.ScalarOperator op)
ColGroup
scalarOperation
in class ColGroup
op
- operation to performpublic 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 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 final void computeSum(MatrixBlock result, org.apache.sysml.runtime.functionobjects.KahanFunction kplus)
computeSum
in class ColGroupOffset
protected final void computeRowSums(MatrixBlock result, org.apache.sysml.runtime.functionobjects.KahanFunction kplus, int rl, int ru)
computeRowSums
in class ColGroupOffset
protected final void computeColSums(MatrixBlock result, org.apache.sysml.runtime.functionobjects.KahanFunction kplus)
computeColSums
in class ColGroupOffset
protected final void computeRowMxx(MatrixBlock result, org.apache.sysml.runtime.functionobjects.Builtin builtin, int rl, int ru)
computeRowMxx
in class ColGroupOffset
protected boolean[] computeZeroIndicatorVector()
computeZeroIndicatorVector
in class ColGroupOffset
protected void countNonZerosPerRow(int[] rnnz, int rl, int ru)
ColGroup
countNonZerosPerRow
in class ColGroup
rnnz
- non-zeros per rowrl
- row lower bound, inclusiveru
- row upper bound, exclusivepublic Iterator<Integer> getIterator(int k)
getIterator
in class ColGroupOffset
k
- index of value tuple with associated bitmappublic Iterator<Integer> getIterator(int k, int rl, int ru)
getIterator
in class ColGroupOffset
k
- index of value tuple with associated bitmaprl
- row lower index, inclusiveru
- row upper index, exclusivepublic ColGroup.ColGroupRowIterator getRowIterator(int rl, int ru)
ColGroup
getRowIterator
in class ColGroup
rl
- row lower index, inclusiveru
- row upper index, exclusiveCopyright © 2018 The Apache Software Foundation. All rights reserved.