Search in sources :

Example 1 with CacheType

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

the class AppendMInstruction method parseInstruction.

public static AppendMInstruction parseInstruction(String str) throws DMLRuntimeException {
    String[] parts = InstructionUtils.getInstructionParts(str);
    InstructionUtils.checkNumFields(parts, 6);
    byte in1 = Byte.parseByte(parts[1]);
    byte in2 = Byte.parseByte(parts[2]);
    long offset = (long) (Double.parseDouble(parts[3]));
    byte out = Byte.parseByte(parts[4]);
    CacheType type = CacheType.valueOf(parts[5]);
    boolean cbind = Boolean.parseBoolean(parts[6]);
    return new AppendMInstruction(null, in1, in2, offset, type, out, cbind, str);
}
Also used : CacheType(org.apache.sysml.lops.AppendM.CacheType)

Example 2 with CacheType

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

the class BinaryMInstruction method parseInstruction.

public static BinaryMInstruction parseInstruction(String str) throws DMLRuntimeException {
    InstructionUtils.checkNumFields(str, 5);
    String[] parts = InstructionUtils.getInstructionParts(str);
    byte in1, in2, out;
    String opcode = parts[0];
    in1 = Byte.parseByte(parts[1]);
    in2 = Byte.parseByte(parts[2]);
    out = Byte.parseByte(parts[3]);
    CacheType ctype = CacheType.valueOf(parts[4]);
    VectorType vtype = VectorType.valueOf(parts[5]);
    BinaryOperator bop = InstructionUtils.parseExtendedBinaryOperator(opcode);
    return new BinaryMInstruction(bop, in1, in2, ctype, vtype, out, str);
}
Also used : VectorType(org.apache.sysml.lops.BinaryM.VectorType) BinaryOperator(org.apache.sysml.runtime.matrix.operators.BinaryOperator) CacheType(org.apache.sysml.lops.AppendM.CacheType)

Aggregations

CacheType (org.apache.sysml.lops.AppendM.CacheType)2 VectorType (org.apache.sysml.lops.BinaryM.VectorType)1 BinaryOperator (org.apache.sysml.runtime.matrix.operators.BinaryOperator)1