use of org.apache.sysml.udf.ExternalFunctionInvocationInstruction in project incubator-systemml by apache.
the class ExternalFunctionProgramBlockCP method execute.
/**
* Method to be invoked to execute instructions for the external function
* invocation
*/
@Override
public void execute(ExecutionContext ec) throws DMLRuntimeException {
_runID = _idSeq.getNextID();
ExternalFunctionInvocationInstruction inst = null;
// execute package function
for (int i = 0; i < _inst.size(); i++) {
try {
inst = (ExternalFunctionInvocationInstruction) _inst.get(i);
inst._namespace = _namespace;
inst._functionName = _functionName;
executeInstruction(ec, inst);
} catch (Exception e) {
throw new DMLRuntimeException(this.printBlockErrorLocation() + "Error evaluating instruction " + i + " in external function programBlock. inst: " + inst.toString(), e);
}
}
// check return values
checkOutputParameters(ec.getVariables());
}
Aggregations