public abstract class ColGroupValue extends ColGroup
ColGroup.CompressionType| Modifier and Type | Field and Description |
|---|---|
protected double[] |
_values
Distinct values associated with individual bitmaps.
|
static boolean |
LOW_LEVEL_OPT |
static boolean |
SORT_VALUES_BY_LENGTH |
_colIndexes, _numRows| Modifier | Constructor and Description |
|---|---|
|
ColGroupValue() |
protected |
ColGroupValue(int[] colIndices,
int numRows,
double[] values)
Constructor for subclass methods that need to create shallow copies
|
|
ColGroupValue(int[] colIndices,
int numRows,
UncompressedBitmap ubm)
Stores the headers for the individual bitmaps.
|
| Modifier and Type | Method and Description |
|---|---|
protected static double[] |
allocDVector(int len,
boolean reset) |
protected static int[] |
allocIVector(int len,
boolean reset) |
protected double[] |
applyScalarOp(org.apache.sysml.runtime.matrix.operators.ScalarOperator op)
Method for use by subclasses.
|
protected double[] |
applyScalarOp(org.apache.sysml.runtime.matrix.operators.ScalarOperator op,
double newVal,
int numCols) |
static void |
cleanupThreadLocalMemory() |
protected void |
computeColMxx(MatrixBlock result,
org.apache.sysml.runtime.functionobjects.Builtin builtin,
boolean zeros)
NOTE: Shared across OLE/RLE/DDC because value-only computation.
|
protected void |
computeMxx(MatrixBlock result,
org.apache.sysml.runtime.functionobjects.Builtin builtin,
boolean zeros)
NOTE: Shared across OLE/RLE/DDC because value-only computation.
|
protected int |
containsAllZeroValue() |
long |
estimateInMemorySize()
Note: Must be overridden by child classes to account for additional data
and metadata
|
abstract int[] |
getCounts() |
int[] |
getCounts(boolean inclZeros) |
abstract int[] |
getCounts(int rl,
int ru) |
MatrixBlock |
getCountsAsBlock() |
static MatrixBlock |
getCountsAsBlock(int[] counts) |
int |
getNumValues()
Obtain number of distinct sets of values associated with the bitmaps in this column group.
|
double |
getValue(int k,
int col) |
double[] |
getValues() |
MatrixBlock |
getValuesAsBlock() |
abstract void |
leftMultByRowVector(ColGroupDDC vector,
MatrixBlock result) |
protected double[] |
preaggValues(int numVals,
double[] b) |
protected double[] |
preaggValues(int numVals,
double[] b,
boolean allocNew) |
static void |
setupThreadLocalMemory(int len) |
protected double[] |
sumAllValues(org.apache.sysml.runtime.functionobjects.KahanFunction kplus,
org.apache.sysml.runtime.instructions.cp.KahanObject kbuff) |
protected double[] |
sumAllValues(org.apache.sysml.runtime.functionobjects.KahanFunction kplus,
org.apache.sysml.runtime.instructions.cp.KahanObject kbuff,
boolean allocNew) |
double |
sumValues(int valIx) |
protected double |
sumValues(int valIx,
double[] b) |
double |
sumValues(int valIx,
org.apache.sysml.runtime.functionobjects.KahanFunction kplus) |
double |
sumValues(int valIx,
org.apache.sysml.runtime.functionobjects.KahanFunction kplus,
org.apache.sysml.runtime.instructions.cp.KahanObject kbuff) |
void |
unaryAggregateOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op,
MatrixBlock result) |
abstract void |
unaryAggregateOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op,
MatrixBlock result,
int rl,
int ru) |
countNonZerosPerRow, decompressToBlock, decompressToBlock, decompressToBlock, get, getColIndex, getColIndices, getCompType, getExactSizeOnDisk, getIterator, getNumCols, getNumRows, leftMultByRowVector, readFields, rightMultByVector, scalarOperation, shiftColIndices, writepublic static boolean LOW_LEVEL_OPT
public static final boolean SORT_VALUES_BY_LENGTH
protected double[] _values
public ColGroupValue()
public ColGroupValue(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 blockprotected ColGroupValue(int[] colIndices,
int numRows,
double[] values)
colIndices - raw column index informationnumRows - number of rows in the blockvalues - set of distinct values for the block (associated bitmaps are
kept in the subclass)public long estimateInMemorySize()
ColGroupestimateInMemorySize in class ColGrouppublic int getNumValues()
public double[] getValues()
public double getValue(int k,
int col)
public MatrixBlock getValuesAsBlock()
public abstract int[] getCounts()
public abstract int[] getCounts(int rl,
int ru)
public int[] getCounts(boolean inclZeros)
public MatrixBlock getCountsAsBlock()
public static MatrixBlock getCountsAsBlock(int[] counts)
protected int containsAllZeroValue()
public final double sumValues(int valIx)
public final double sumValues(int valIx,
org.apache.sysml.runtime.functionobjects.KahanFunction kplus)
public final double sumValues(int valIx,
org.apache.sysml.runtime.functionobjects.KahanFunction kplus,
org.apache.sysml.runtime.instructions.cp.KahanObject kbuff)
protected final double[] sumAllValues(org.apache.sysml.runtime.functionobjects.KahanFunction kplus,
org.apache.sysml.runtime.instructions.cp.KahanObject kbuff)
protected final double[] sumAllValues(org.apache.sysml.runtime.functionobjects.KahanFunction kplus,
org.apache.sysml.runtime.instructions.cp.KahanObject kbuff,
boolean allocNew)
protected final double sumValues(int valIx,
double[] b)
protected final double[] preaggValues(int numVals,
double[] b)
protected final double[] preaggValues(int numVals,
double[] b,
boolean allocNew)
protected void computeMxx(MatrixBlock result, org.apache.sysml.runtime.functionobjects.Builtin builtin, boolean zeros)
result - output matrix blockbuiltin - function objectzeros - indicator if column group contains zero valuesprotected void computeColMxx(MatrixBlock result, org.apache.sysml.runtime.functionobjects.Builtin builtin, boolean zeros)
result - output matrix blockbuiltin - function objectzeros - indicator if column group contains zero valuespublic abstract void leftMultByRowVector(ColGroupDDC vector, MatrixBlock result) throws DMLRuntimeException
DMLRuntimeExceptionprotected double[] applyScalarOp(org.apache.sysml.runtime.matrix.operators.ScalarOperator op)
throws DMLRuntimeException
op - scalar operation to performDMLRuntimeException - if DMLRuntimeException occursprotected double[] applyScalarOp(org.apache.sysml.runtime.matrix.operators.ScalarOperator op,
double newVal,
int numCols)
throws DMLRuntimeException
DMLRuntimeExceptionpublic void unaryAggregateOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op,
MatrixBlock result)
throws DMLRuntimeException
unaryAggregateOperations in class ColGroupDMLRuntimeExceptionpublic abstract void unaryAggregateOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op,
MatrixBlock result,
int rl,
int ru)
throws DMLRuntimeException
op - aggregation operatorresult - output matrix blockrl - row lower index, inclusiveru - row upper index, exclusiveDMLRuntimeException - on invalid inputspublic static void setupThreadLocalMemory(int len)
public static void cleanupThreadLocalMemory()
protected static double[] allocDVector(int len,
boolean reset)
protected static int[] allocIVector(int len,
boolean reset)
Copyright © 2017 The Apache Software Foundation. All rights reserved.