use of org.apache.sysml.lops.MultipleCP in project incubator-systemml by apache.
the class MultipleOp method constructLops.
/**
* Construct the corresponding Lops for this Hop
*/
@Override
public Lop constructLops() throws HopsException, LopsException {
// reuse existing lop
if (getLops() != null)
return getLops();
try {
ArrayList<Hop> inHops = getInput();
Lop[] inLops = new Lop[inHops.size()];
for (int i = 0; i < inHops.size(); i++) {
Hop inHop = inHops.get(i);
Lop inLop = inHop.constructLops();
inLops[i] = inLop;
}
MultipleCP.OperationType opType = MultipleOperandOperationHopTypeToLopType.get(multipleOperandOperation);
if (opType == null) {
throw new HopsException("Unknown MultipleCP Lop operation type for MultipleOperandOperation Hop type '" + multipleOperandOperation + "'");
}
MultipleCP multipleCPLop = new MultipleCP(opType, getDataType(), getValueType(), inLops);
setOutputDimensions(multipleCPLop);
setLineNumbers(multipleCPLop);
setLops(multipleCPLop);
} catch (Exception e) {
throw new HopsException(this.printErrorLocation() + "error constructing Lops for MultipleOp Hop -- \n ", e);
}
// add reblock/checkpoint lops if necessary
constructAndSetLopsDataFlowProperties();
return getLops();
}
Aggregations