org.apache.sysml.runtime.compress

Class ColGroupValue

    • Field Detail

      • LOW_LEVEL_OPT

        public static boolean LOW_LEVEL_OPT
      • SORT_VALUES_BY_LENGTH

        public static final boolean SORT_VALUES_BY_LENGTH
        See Also:
        Constant Field Values
      • _values

        protected double[] _values
        Distinct values associated with individual bitmaps.
    • Constructor Detail

      • ColGroupValue

        public ColGroupValue()
      • ColGroupValue

        public ColGroupValue(int[] colIndices,
                             int numRows,
                             UncompressedBitmap ubm)
        Stores the headers for the individual bitmaps.
        Parameters:
        colIndices - indices (within the block) of the columns included in this column
        numRows - total number of rows in the parent block
        ubm - Uncompressed bitmap representation of the block
      • ColGroupValue

        protected ColGroupValue(int[] colIndices,
                                int numRows,
                                double[] values)
        Constructor for subclass methods that need to create shallow copies
        Parameters:
        colIndices - raw column index information
        numRows - number of rows in the block
        values - set of distinct values for the block (associated bitmaps are kept in the subclass)
    • Method Detail

      • estimateInMemorySize

        public long estimateInMemorySize()
        Description copied from class: ColGroup
        Note: Must be overridden by child classes to account for additional data and metadata
        Overrides:
        estimateInMemorySize in class ColGroup
        Returns:
        an upper bound on the number of bytes used to store this ColGroup in memory.
      • getNumValues

        public int getNumValues()
        Obtain number of distrinct sets of values associated with the bitmaps in this column group.
        Returns:
        the number of distinct sets of values associated with the bitmaps in this column group
      • getValues

        public double[] getValues()
      • containsAllZeroValue

        protected int containsAllZeroValue()
      • sumValues

        protected final double sumValues(int valIx)
      • sumValues

        protected final double sumValues(int valIx,
                                         org.apache.sysml.runtime.functionobjects.KahanFunction kplus,
                                         org.apache.sysml.runtime.instructions.cp.KahanObject kbuff)
      • sumAllValues

        protected final double[] sumAllValues(org.apache.sysml.runtime.functionobjects.KahanFunction kplus,
                                              org.apache.sysml.runtime.instructions.cp.KahanObject kbuff)
      • sumAllValues

        protected final double[] sumAllValues(org.apache.sysml.runtime.functionobjects.KahanFunction kplus,
                                              org.apache.sysml.runtime.instructions.cp.KahanObject kbuff,
                                              boolean allocNew)
      • sumValues

        protected final double sumValues(int valIx,
                                         double[] b)
      • preaggValues

        protected final double[] preaggValues(int numVals,
                                              double[] b)
      • preaggValues

        protected final double[] preaggValues(int numVals,
                                              double[] b,
                                              boolean allocNew)
      • computeMxx

        protected void computeMxx(MatrixBlock result,
                                  org.apache.sysml.runtime.functionobjects.Builtin builtin,
                                  boolean zeros)
        NOTE: Shared across OLE/RLE/DDC because value-only computation.
        Parameters:
        result - output matrix block
        builtin - function object
        zeros - indicator if column group contains zero values
      • computeColMxx

        protected void computeColMxx(MatrixBlock result,
                                     org.apache.sysml.runtime.functionobjects.Builtin builtin,
                                     boolean zeros)
        NOTE: Shared across OLE/RLE/DDC because value-only computation.
        Parameters:
        result - output matrix block
        builtin - function object
        zeros - indicator if column group contains zero values
      • applyScalarOp

        protected double[] applyScalarOp(org.apache.sysml.runtime.matrix.operators.ScalarOperator op)
                                  throws DMLRuntimeException
        Method for use by subclasses. Applies a scalar operation to the value metadata stored in the superclass.
        Parameters:
        op - scalar operation to perform
        Returns:
        transformed copy of value metadata for this column group
        Throws:
        DMLRuntimeException - if DMLRuntimeException occurs
      • applyScalarOp

        protected double[] applyScalarOp(org.apache.sysml.runtime.matrix.operators.ScalarOperator op,
                                         double newVal,
                                         int numCols)
                                  throws DMLRuntimeException
        Throws:
        DMLRuntimeException
      • unaryAggregateOperations

        public abstract void unaryAggregateOperations(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator op,
                                                      MatrixBlock result,
                                                      int rl,
                                                      int ru)
                                               throws DMLRuntimeException
        Parameters:
        op - aggregation operator
        result - output matrix block
        rl - row lower index, inclusive
        ru - row upper index, exclusive
        Throws:
        DMLRuntimeException - on invalid inputs
      • setupThreadLocalMemory

        public static void setupThreadLocalMemory(int len)
      • cleanupThreadLocalMemory

        public static void cleanupThreadLocalMemory()
      • allocDVector

        protected static double[] allocDVector(int len,
                                               boolean reset)
      • allocIVector

        protected static int[] allocIVector(int len,
                                            boolean reset)

Copyright © 2017 The Apache Software Foundation. All rights reserved.