int mult = bestMult(8500,65000);
mult = bestMult(8500,65000);
    public static void generateFusionHeader(SIRStream top_stream, boolean inc_mult) {        //WorkEstimate work_est = WorkEstimate.getWorkEstimate(top_stream);        int threadCount = NodeEnumerator.getNumberOfNodes();            CodegenPrintWriter p = null;            try {            p = new CodegenPrintWriter(new FileWriter("fusion.h"));        } catch (IOException e) {            e.printStackTrace();            System.exit(1);        }        p.print("#ifndef __FUSION_H\n");        p.print("#define __FUSION_H\n");        p.newline();        p.print("#define max(A,B) (((A)>(B))?(A):(B))\n");        p.print("#define pow2ceil(A) ((A<=256)?(256):(((A<=1024)?(1024):(((A<=4096)?(4096):(((A<=16384)?(16384):(((A<=65536)?(65536):(((A<=131072)?(131072):(((A<=262144)?(262144):(((A<=524288)?(524288):(((A<=1048576)?(1048576):(((A<=2097152)?(2097152):(((A<=4194304)?(4194304):(((A<=8388608)?(8388608):(((A<=16777216)?(16777216):(((A<=33554432)?(33554432):(((A<=67108864)?(67108864):(((A<=134217728)?(134217728):(((A<=268435456)?(268435456):(((A<=536870912)?(536870912):(1073741824))))))))))))))))))))))))))))))))))))");        p.newLine();        //p.print("#define __ITERS 10000\n");        //int mult = bestMult(16000,65000,work_est); // estimating best multiplicity         int mult = bestMult(8500,65000); // estimating best multiplicity         if (KjcOptions.nomult || !inc_mult) mult = 1;        p.print("#define __MULT "+mult+"\n");        p.newLine();        if (KjcOptions.standalone) {        //p.print("#define __CLUSTER_STANDALONE\n");        // threadcount is the number of operators after fusion/cacheopts        for (int t = 0; t < threadCount; t++) {                   SIROperator oper = NodeEnumerator.getOperator(t);           Vector<NetStream> out = RegisterStreams.getNodeOutStreams(oper);            for (int i = 0; i < out.size(); i++) {                NetStream stream = out.elementAt(i);                int src = stream.getSource();                int dst = stream.getDest();                              if (FixedBufferTape.isFixedBuffer(src,dst)) {                    p.print("#define __FUSED_"+src+"_"+dst+"\n");                }                                int extraPeeks = FixedBufferTape.getExtraPeeks(src,dst);                if (extraPeeks > 0) {                    p.print("//destination peeks: "+(extraPeeks)+" extra items\n");                    p.print("#define __PEEK_BUF_SIZE_" + src + "_" + dst                                + " " + extraPeeks + "\n");                }                //if (KjcOptions.peekratio == 1024 || no_peek) {                if (! FixedBufferTape.needsModularBuffer(src,dst)) {                    p.print("#define __NOMOD_"+src+"_"+dst+"\n");                }                FixedBufferTape.calcSizes(src, dst, p, true);                        p.print("#define __BUF_SIZE_MASK_" + src + "_" + dst                            + " (pow2ceil(max(" + FixedBufferTape.getInitItems()                            + "," + FixedBufferTape.getSteadyItems() + "*__MULT)+"                            + FixedBufferTape.getExtraPeeks(src,dst) + ")-1)\n");                p.print("\n");            }        }        }        p.print("#endif\n");                 try {            p.close();        }        catch (Exception e) {            System.err.println("Unable to write fusion.h");        }    }