if (items > 0) { int iterations, stage = 1, typeSize;
if (iterations > 0) { int stage = 1, typeSize;
    private static void performSplitOutputTrace(OutputTraceNode traceNode, FilterTraceNode filter,						FilterInfo filterInfo, boolean init, boolean primepump,						int items)    {	if (items > 0) {	    int iterations, stage = 1, typeSize;	    //the stage we are generating code for as used below for generateSwitchCode()	    if (!init && !primepump) 		stage = 2;	    	    typeSize = Util.getTypeSize(filter.getFilter().getOutputType());	    	    //the numbers of times we should cycle thru this "splitter"	    assert items % traceNode.totalWeights() == 0: 		"weights on output trace node does not divide evenly with items sent";	    iterations = items / traceNode.totalWeights();	    	    SpaceTimeBackend.println("Generating Switch Code for " + traceNode + " items " + items +				     " iterations " + iterations);	    	    //is there a load immediate in the switch instruction set?!	    //I guess not, if switch instruction memory is a problem	    //this naive implementation will have to change	    StreamingDram sourcePort = IntraTraceBuffer.getBuffer(filter, traceNode).getDRAM();	    for (int i = 0; i < iterations; i++) {		for (int j = 0; j < traceNode.getWeights().length; j++) {		    for (int k = 0; k < traceNode.getWeights()[j]; k++) {			//generate the array of compute node dests			ComputeNode dests[] = new ComputeNode[traceNode.getDests()[j].length];			for (int d = 0; d < dests.length; d++) 			    dests[d] = InterTraceBuffer.getBuffer(traceNode.getDests()[j][d]).getDRAM();			for (int q = 0; q < typeSize; q++)			    SwitchCodeStore.generateSwitchCode(sourcePort, 							       dests, stage);		    }		}	    }	    //because transfers must be cache line size divisible...	    //disregard the dummy values coming out of the dram	    if ((items * typeSize) % RawChip.cacheLineWords != 0) {		int remainder = RawChip.cacheLineWords - (items * typeSize) % RawChip.cacheLineWords;		SwitchCodeStore.disregardIncoming(sourcePort, remainder, init || primepump);	    }	    //write dummy values into each temp buffer with a remainder	    Iterator it = traceNode.getDestSet().iterator();	    while (it.hasNext()) {		Edge edge = (Edge)it.next();		int remainder = RawChip.cacheLineWords - ((typeSize * iterations * traceNode.getWeight(edge)) %							  RawChip.cacheLineWords);		if (remainder > 0)		    SwitchCodeStore.dummyOutgoing(InterTraceBuffer.getBuffer(edge).getDRAM(),						  remainder, init || primepump);	    }   	}    }