Class PartialAggregate

  • public class PartialAggregate
    extends Lop
    Lop to perform a partial aggregation. It was introduced to do some initial aggregation operations on blocks in the mapper/reducer.
    • Method Detail

      • getCorrectionLocation

        public Types.CorrectionLocationType getCorrectionLocation()
        This method computes the location of "correction" terms in the output produced by PartialAgg instruction. When computing the stable sum, "correction" refers to the compensation as defined by the original Kahan algorithm. When computing the stable mean, "correction" refers to two extra values (the running mean, count) produced by each Mapper i.e., by each PartialAgg instruction. This method is invoked during hop-to-lop translation, while creating the corresponding Aggregate lop Computed information is encoded in the PartialAgg instruction so that the appropriate aggregate operator is used at runtime (see: and dml.runtime.matrix)
        correct location
      • getAggType

        public AggBinaryOp.SparkAggType getAggType()
        Description copied from class: Lop
        Method to get aggregate type if applicable. This method is overridden by the Lops with aggregate types (e.g. MapMult)
        getAggType in class Lop
      • setDimensionsBasedOnDirection

        public void setDimensionsBasedOnDirection​(long dim1,
                                                  long dim2,
                                                  long blen)
      • setDimensionsBasedOnDirection

        public static void setDimensionsBasedOnDirection​(Lop lop,
                                                         long dim1,
                                                         long dim2,
                                                         long blen,
                                                         Types.Direction dir)
      • toString

        public String toString()
        Description copied from class: Lop
        Method to have Lops print their state. This is for debugging purposes.
        Specified by:
        toString in class Lop
      • getInstructions

        public String getInstructions​(String input1,
                                      String output)
        Instruction generation for CP and Spark
        getInstructions in class Lop
        input1 - input 1
        output - output
        instructions as string