use of org.apache.sysml.runtime.matrix.operators.AggregateBinaryOperator in project incubator-systemml by apache.
the class AggregateBinaryCPInstruction method processInstruction.
@Override
public void processInstruction(ExecutionContext ec) {
// get inputs
MatrixBlock matBlock1 = ec.getMatrixInput(input1.getName(), getExtendedOpcode());
MatrixBlock matBlock2 = ec.getMatrixInput(input2.getName(), getExtendedOpcode());
// compute matrix multiplication
AggregateBinaryOperator ab_op = (AggregateBinaryOperator) _optr;
MatrixBlock main = (matBlock2 instanceof CompressedMatrixBlock) ? matBlock2 : matBlock1;
MatrixBlock ret = main.aggregateBinaryOperations(matBlock1, matBlock2, new MatrixBlock(), ab_op);
// release inputs/outputs
ec.releaseMatrixInput(input1.getName(), getExtendedOpcode());
ec.releaseMatrixInput(input2.getName(), getExtendedOpcode());
ec.setMatrixOutput(output.getName(), ret, getExtendedOpcode());
}
Aggregations