1 /**--------- <copy/paste C code snippet in surf/network.c> -------------
3 * ./regression2.py ./pingpong-in.dat 0.15 100 2 2.4e-5 1.25e8
6 plot "./pingpong-in.dat" using 1:2 with lines title "data", \
7 (x >= 65472) ? 0.00850436*x+558.894 : \
8 (x >= 15424) ? 0.0114635*x+167.446 : \
9 (x >= 9376) ? 0.0136219*x+124.464 : \
10 (x >= 5776) ? 0.00735707*x+105.022 : \
11 (x >= 3484) ? 0.0103235*x+90.2886 : \
12 (x >= 1426) ? 0.0131384*x+77.3159 : \
13 (x >= 732) ? 0.0233927*x+93.6146 : \
14 (x >= 257) ? 0.0236608*x+93.7637 : \
15 (x >= 0) ? 0.00985119*x+96.704 : \
16 1.0 with lines title "piecewise function"
17 *-------------------------------------------------------------------*/
19 static double smpi_bandwidth_factor(double size)
22 if (size >= 65472) return 0.940694;
23 if (size >= 15424) return 0.697866;
24 if (size >= 9376) return 0.58729;
25 if (size >= 5776) return 1.08739;
26 if (size >= 3484) return 0.77493;
27 if (size >= 1426) return 0.608902;
28 if (size >= 732) return 0.341987;
29 if (size >= 257) return 0.338112;
30 if (size >= 0) return 0.812084;
34 static double smpi_latency_factor(double size)
37 if (size >= 65472) return 11.6436;
38 if (size >= 15424) return 3.48845;
39 if (size >= 9376) return 2.59299;
40 if (size >= 5776) return 2.18796;
41 if (size >= 3484) return 1.88101;
42 if (size >= 1426) return 1.61075;
43 if (size >= 732) return 1.9503;
44 if (size >= 257) return 1.95341;
45 if (size >= 0) return 2.01467;
49 /**--------- <copy/paste C code snippet in surf/network.c> -----------*/