public abstract class ColGroupValue extends ColGroup
ColGroup.ColGroupRowIterator, 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
|
int[] |
getCounts() |
int[] |
getCounts(boolean inclZeros) |
abstract int[] |
getCounts(int[] out) |
int[] |
getCounts(int rl,
int ru) |
abstract int[] |
getCounts(int rl,
int ru,
int[] out) |
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() |
long |
getValuesSize() |
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) |
void |
setValues(double[] values) |
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, getRowIterator, leftMultByRowVector, readFields, readFields, rightMultByVector, scalarOperation, shiftColIndices, write, write
public 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()
ColGroup
estimateInMemorySize
in class ColGroup
public long getValuesSize()
public int getNumValues()
public double[] getValues()
public void setValues(double[] values)
public double getValue(int k, int col)
public MatrixBlock getValuesAsBlock()
public final int[] getCounts()
public abstract int[] getCounts(int[] out)
public final int[] getCounts(int rl, int ru)
public abstract int[] getCounts(int rl, int ru, int[] out)
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)
protected double[] applyScalarOp(org.apache.sysml.runtime.matrix.operators.ScalarOperator op)
op
- scalar operation to performprotected double[] applyScalarOp(org.apache.sysml.runtime.matrix.operators.ScalarOperator op, double newVal, int numCols)
public void unaryAggregateOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op, MatrixBlock result)
unaryAggregateOperations
in class ColGroup
public abstract void unaryAggregateOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op, MatrixBlock result, int rl, int ru)
op
- aggregation operatorresult
- output matrix blockrl
- row lower index, inclusiveru
- row upper index, exclusivepublic 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 © 2018 The Apache Software Foundation. All rights reserved.