Search in sources :

Example 1 with CacheType

use of org.apache.sysml.lops.PMMJ.CacheType in project incubator-systemml by apache.

the class PMMJMRInstruction method parseInstruction.

public static PMMJMRInstruction parseInstruction(String str) throws DMLRuntimeException {
    InstructionUtils.checkNumFields(str, 6);
    String[] parts = InstructionUtils.getInstructionParts(str);
    String opcode = parts[0];
    byte in1 = Byte.parseByte(parts[1]);
    byte in2 = Byte.parseByte(parts[2]);
    long nrow = UtilFunctions.toLong(Double.parseDouble(parts[3]));
    byte out = Byte.parseByte(parts[4]);
    CacheType ctype = CacheType.valueOf(parts[5]);
    boolean outputEmpty = Boolean.parseBoolean(parts[6]);
    if (!opcode.equalsIgnoreCase("pmm"))
        throw new DMLRuntimeException("Unknown opcode while parsing an PmmMRInstruction: " + str);
    return new PMMJMRInstruction(new Operator(true), in1, in2, out, nrow, ctype, outputEmpty, str);
}
Also used : Operator(org.apache.sysml.runtime.matrix.operators.Operator) CacheType(org.apache.sysml.lops.PMMJ.CacheType) DMLRuntimeException(org.apache.sysml.runtime.DMLRuntimeException)

Aggregations

CacheType (org.apache.sysml.lops.PMMJ.CacheType)1 DMLRuntimeException (org.apache.sysml.runtime.DMLRuntimeException)1 Operator (org.apache.sysml.runtime.matrix.operators.Operator)1