MCPcopy Create free account
hub / github.com/Niko1221/Strata / rate

Function rate

engine/src/split/tools/batch_plan_test.cpp:18–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16constexpr int ROWS = 16; // MAXT
17
18double rate(const std::vector<fnx::RowOffer>& L, const std::vector<int>& d, double base, const fnx::RowCost& c) {
19 double tok = (double) L.size(), ms = base;
20 int rows = (int) L.size();
21 for (size_t i = 0; i < L.size(); ++i)
22 for (int j = 0; j < d[i]; ++j) {
23 tok += L[i].reach[(size_t) j];
24 ms += c.row(++rows) + (L[i].chain && j >= 1 ? c.chain_ms : 0.0);
25 }
26 return tok / ms;
27}
28
29double best_rate(const std::vector<fnx::RowOffer>& L, double base, const fnx::RowCost& c) {
30 std::vector<int> d(L.size(), 0);

Callers 3

best_rateFunction · 0.70
mainFunction · 0.70
chooseMethod · 0.50

Calls 2

sizeMethod · 0.45
rowMethod · 0.45

Tested by

no test coverage detected