Class PartialAggregate

java.lang.Object
org.apache.sysds.lops.Lop
org.apache.sysds.lops.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.
  • Constructor Details

  • Method Details

    • 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: dml.runtime.matrix.operator.AggregateOperator.java and dml.runtime.matrix)
      Returns:
      correct location
    • getCorrectionLocation

      public static Types.CorrectionLocationType getCorrectionLocation(Types.AggOp operation, Types.Direction direction)
    • 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)
      Overrides:
      getAggType in class Lop
      Returns:
      SparkAggType
    • 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
      Overrides:
      getInstructions in class Lop
      Parameters:
      input1 - input 1
      output - output
      Returns:
      instructions as string
    • getOpcode

      public static String getOpcode(Types.AggOp op, Types.Direction dir)