use of org.apache.sysml.runtime.matrix.data.CM_N_COVCell in project systemml by apache.
the class CMCOVMRMapper method specialOperationsForActualMap.
@Override
protected void specialOperationsForActualMap(int index, OutputCollector<Writable, Writable> out, Reporter reporter) throws IOException {
// apply all instructions
processMapperInstructionsForMatrix(index);
for (byte tag : cmTags) {
CM lcmFn = cmFn.get(tag);
IndexedMatrixValue input = cachedValues.getFirst(tag);
if (input == null)
continue;
WeightedPair inputPair = (WeightedPair) input.getValue();
CM_N_COVCell cmValue = (CM_N_COVCell) cmNcovCache.getFirst(tag).getValue();
try {
lcmFn.execute(cmValue.getCM_N_COVObject(), inputPair.getValue(), inputPair.getWeight());
} catch (DMLRuntimeException e) {
throw new IOException(e);
}
}
for (byte tag : covTags) {
IndexedMatrixValue input = cachedValues.getFirst(tag);
if (input == null)
continue;
WeightedPair inputPair = (WeightedPair) input.getValue();
CM_N_COVCell comValue = (CM_N_COVCell) cmNcovCache.getFirst(tag).getValue();
try {
covFn.execute(comValue.getCM_N_COVObject(), inputPair.getValue(), inputPair.getOtherValue(), inputPair.getWeight());
} catch (DMLRuntimeException e) {
throw new IOException(e);
}
}
}
Aggregations