for (int i = 0; i < input.getSources().length; i++) {
Iterator<Edge> edges = input.getSourceSet().iterator(); while (edges.hasNext()) { Edge edge = edges.next();
    private static void generateInputDRAMCommands(InputTraceNode input,                                                  boolean init, boolean primepump) {        FilterTraceNode filter = (FilterTraceNode) input.getNext();        // do not generate the code if it is not necessary        if (OffChipBuffer.unnecessary(input))            return;        // number of total items that are being joined        int items = FilterInfo.getFilterInfo(filter).totalItemsReceived(init,                                                                        primepump);        // do nothing if there is nothing to do        if (items == 0)            return;            assert items % input.totalWeights() == 0 : "weights on input trace node does not divide evenly with items received";        // iterations of "joiner"        int iterations = items / input.totalWeights();        int typeSize = Util.getTypeSize(filter.getFilter().getInputType());        // generate the commands to read from the o/i temp buffer        // for each input to the input trace node        for (int i = 0; i < input.getSources().length; i++) {            // get the first non-redundant buffer                     OffChipBuffer srcBuffer =                 InterTraceBuffer.getBuffer(input.getSources()[i]).getNonRedundant();                        assert srcBuffer != null;                        SpaceTimeBackend.println("Generate the DRAM read command for "                                     + srcBuffer);            int readWords = iterations * typeSize                * input.getWeight(input.getSources()[i]);            if (srcBuffer.getDest() instanceof OutputTraceNode                && ((OutputTraceNode) srcBuffer.getDest()).isFileInput())                srcBuffer.getOwner().getComputeCode().addFileCommand(true,                        init || primepump, readWords, srcBuffer, true);            else                srcBuffer.getOwner().getComputeCode().addDRAMCommand(true,                        init, primepump, Util.cacheLineDiv(readWords * 4),                         srcBuffer, true);        }        // generate the command to write to the dest of the input trace node        OffChipBuffer destBuffer = IntraTraceBuffer.getBuffer(input, filter);        int writeWords = items * typeSize;        if (input.isFileOutput() && OffChipBuffer.unnecessary(input))            destBuffer.getOwner().getComputeCode().addFileCommand(false,                    init || primepump, writeWords, destBuffer, true);        else            destBuffer.getOwner().getComputeCode().addDRAMCommand(false, init,                    primepump, Util.cacheLineDiv(writeWords * 4),                     destBuffer, true);    }