Search in sources :

Example 26 with AggregateUnaryOperator

use of org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator in project incubator-systemml by apache.

the class InstructionUtils method parseCumulativeAggregateUnaryOperator.

public static AggregateUnaryOperator parseCumulativeAggregateUnaryOperator(String opcode) {
    AggregateUnaryOperator aggun = null;
    if ("ucumack+".equals(opcode)) {
        AggregateOperator agg = new AggregateOperator(0, KahanPlus.getKahanPlusFnObject(), true, CorrectionLocationType.LASTROW);
        aggun = new AggregateUnaryOperator(agg, ReduceRow.getReduceRowFnObject());
    } else if ("ucumac*".equals(opcode)) {
        AggregateOperator agg = new AggregateOperator(0, Multiply.getMultiplyFnObject(), false, CorrectionLocationType.NONE);
        aggun = new AggregateUnaryOperator(agg, ReduceRow.getReduceRowFnObject());
    } else if ("ucumacmin".equals(opcode)) {
        AggregateOperator agg = new AggregateOperator(0, Builtin.getBuiltinFnObject("min"), false, CorrectionLocationType.NONE);
        aggun = new AggregateUnaryOperator(agg, ReduceRow.getReduceRowFnObject());
    } else if ("ucumacmax".equals(opcode)) {
        AggregateOperator agg = new AggregateOperator(0, Builtin.getBuiltinFnObject("max"), false, CorrectionLocationType.NONE);
        aggun = new AggregateUnaryOperator(agg, ReduceRow.getReduceRowFnObject());
    }
    return aggun;
}
Also used : AggregateUnaryOperator(org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator) AggregateOperator(org.apache.sysml.runtime.matrix.operators.AggregateOperator)

Aggregations

AggregateUnaryOperator (org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator)26 AggregateOperator (org.apache.sysml.runtime.matrix.operators.AggregateOperator)11 CorrectionLocationType (org.apache.sysml.lops.PartialAggregate.CorrectionLocationType)7 MatrixBlock (org.apache.sysml.runtime.matrix.data.MatrixBlock)7 DMLRuntimeException (org.apache.sysml.runtime.DMLRuntimeException)5 BinaryOperator (org.apache.sysml.runtime.matrix.operators.BinaryOperator)5 CPOperand (org.apache.sysml.runtime.instructions.cp.CPOperand)4 CompressedMatrixBlock (org.apache.sysml.runtime.compress.CompressedMatrixBlock)3 MatrixIndexes (org.apache.sysml.runtime.matrix.data.MatrixIndexes)3 SparkExecutionContext (org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext)2 CM (org.apache.sysml.runtime.functionobjects.CM)2 MatrixCharacteristics (org.apache.sysml.runtime.matrix.MatrixCharacteristics)2 ArrayList (java.util.ArrayList)1 ExecutorService (java.util.concurrent.ExecutorService)1 Future (java.util.concurrent.Future)1 SparkAggType (org.apache.sysml.hops.AggBinaryOp.SparkAggType)1 MMTSJType (org.apache.sysml.lops.MMTSJ.MMTSJType)1 MatrixObject (org.apache.sysml.runtime.controlprogram.caching.MatrixObject)1 IndexFunction (org.apache.sysml.runtime.functionobjects.IndexFunction)1 ReduceAll (org.apache.sysml.runtime.functionobjects.ReduceAll)1