Search in sources :

Example 61 with CPOperand

use of org.apache.sysml.runtime.instructions.cp.CPOperand in project incubator-systemml by apache.

the class MatrixReshapeSPInstruction method parseInstruction.

public static MatrixReshapeSPInstruction parseInstruction(String str) throws DMLRuntimeException {
    String[] parts = InstructionUtils.getInstructionPartsWithValueType(str);
    InstructionUtils.checkNumFields(parts, 5);
    String opcode = parts[0];
    CPOperand in1 = new CPOperand(parts[1]);
    CPOperand in2 = new CPOperand(parts[2]);
    CPOperand in3 = new CPOperand(parts[3]);
    CPOperand in4 = new CPOperand(parts[4]);
    CPOperand out = new CPOperand(parts[5]);
    if (!opcode.equalsIgnoreCase("rshape"))
        throw new DMLRuntimeException("Unknown opcode while parsing an MatrixReshapeInstruction: " + str);
    else
        return new MatrixReshapeSPInstruction(new Operator(true), in1, in2, in3, in4, out, opcode, str);
}
Also used : Operator(org.apache.sysml.runtime.matrix.operators.Operator) CPOperand(org.apache.sysml.runtime.instructions.cp.CPOperand) DMLRuntimeException(org.apache.sysml.runtime.DMLRuntimeException)

Aggregations

CPOperand (org.apache.sysml.runtime.instructions.cp.CPOperand)61 DMLRuntimeException (org.apache.sysml.runtime.DMLRuntimeException)44 AggregateOperator (org.apache.sysml.runtime.matrix.operators.AggregateOperator)10 Operator (org.apache.sysml.runtime.matrix.operators.Operator)10 ArrayList (java.util.ArrayList)6 ValueFunction (org.apache.sysml.runtime.functionobjects.ValueFunction)6 AggregateBinaryOperator (org.apache.sysml.runtime.matrix.operators.AggregateBinaryOperator)6 ReorgOperator (org.apache.sysml.runtime.matrix.operators.ReorgOperator)6 SimpleOperator (org.apache.sysml.runtime.matrix.operators.SimpleOperator)6 AggregateUnaryOperator (org.apache.sysml.runtime.matrix.operators.AggregateUnaryOperator)5 BinaryOperator (org.apache.sysml.runtime.matrix.operators.BinaryOperator)5 SparkAggType (org.apache.sysml.hops.AggBinaryOp.SparkAggType)4 DataType (org.apache.sysml.parser.Expression.DataType)4 ScalarObject (org.apache.sysml.runtime.instructions.cp.ScalarObject)4 MatrixBlock (org.apache.sysml.runtime.matrix.data.MatrixBlock)4 CMOperator (org.apache.sysml.runtime.matrix.operators.CMOperator)4 VectorType (org.apache.sysml.lops.BinaryM.VectorType)3 MMTSJType (org.apache.sysml.lops.MMTSJ.MMTSJType)3 SparkExecutionContext (org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext)3 MatrixIndexes (org.apache.sysml.runtime.matrix.data.MatrixIndexes)3