for (int f = 1; f < scheduleOrder[i].getFilterNodes().length; f++) { node = scheduleOrder[i].getFilterNodes()[f];
for (int f = 1; f < trace.getFilterNodes().length; f++) { node = trace.getFilterNodes()[f];
    private int[] getTileWorksOld() {        int[] tileCosts = new int[rawChip.getTotalTiles()];                for (int i = 0; i < scheduleOrder.length; i++) {            FilterTraceNode node = scheduleOrder[i].getFilterNodes()[0];            RawTile tile = (RawTile)assignment.get(node);            //the cost of the previous node, not used for first filter             int prevStart = tileCosts[tile.getTileNumber()];                                //the first filter does not have to account for startup lag            tileCosts[tile.getTileNumber()] +=                 partitioner.getFilterWorkSteadyMult(node);            //now cycle thru the rest of the nodes...            for (int f = 1; f < scheduleOrder[i].getFilterNodes().length; f++) {                node = scheduleOrder[i].getFilterNodes()[f];                //get this node's assignment;                tile = (RawTile)assignment.get(node);                //accounting for pipeling lag, when is the earliest I can start?                                //offset is the offset between the last filter's start time                //and this tile's current work load, if it is positive,                //this tile is free after the last time, so we should,                //account for this time in the pipeline lag                //if negative, this tile is free before the last tile was free                //so it does not help, so set to zero                int offSet = tileCosts[tile.getTileNumber()] -                    prevStart;                                offSet = Math.max(0, offSet);                                //now when is the earliest I can start in relation to the last tile                //and the work of this tile                int pipeLag =                     Math.max((partitioner.getFilterStartupCost(node) - offSet),                            0);                                //set the prev start to when I started, for the next iteration                prevStart = tileCosts[tile.getTileNumber()];                //the new work for this tile, is my work + my startup cost...                tileCosts[tile.getTileNumber()] += (pipeLag +                     partitioner.getFilterWorkSteadyMult(node));                           }            //account for the cost of issuing its load dram commands             RawTile inputTile =                 (RawTile)assignment.get(scheduleOrder[i].getHead().getNextFilter());            tileCosts[inputTile.getTileNumber()]+= DRAM_ISSUE_COST;                                    //account for the            //cost of sending an item over the gdn if it uses it...            RawTile outputTile =                 (RawTile)assignment.get(scheduleOrder[i].getTail().getPrevFilter());            if (LogicalDramTileMapping.mustUseGdn(outputTile)) {                tileCosts[outputTile.getTileNumber()] += (node.getFilter().getPushInt() *                         node.getFilter().getSteadyMult() *                         GDN_PUSH_COST);            }                        //account for the cost of issuing its store dram command            tileCosts[outputTile.getTileNumber()]+= DRAM_ISSUE_COST;        }                 return tileCosts;    }