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

Method start

engine/src/split/src/batch.cpp:40–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38} // namespace
39
40void BatchLane::start(int lane_, const Sampling& s_, const std::mt19937_64& rng_, std::vector<int> ctx_) {
41 if (ctx_.empty()) throw std::runtime_error("batch lane: no next token");
42 lane = lane_;
43 s = s_;
44 rng = rng_;
45 ctx = std::move(ctx_);
46 drafts.clear();
47 qs.clear();
48 chain = false;
49 chains = 0;
50 shadow = -1;
51 shadow_q = Dist{};
52 idle = 0;
53 tried.assign(MAXT, 1.0);
54 stood.assign(MAXT, CHAIN_PRIOR);
55 lk_tried.assign(MAXT, 1.0);
56 lk_stood.assign(MAXT, LOOKUP_PRIOR);
57 offered = accepted = 0;
58}
59
60void BatchLane::cut(int rows) {
61 const size_t d = (size_t) std::max(0, rows - 1);

Callers 3

batch_checkFunction · 0.45
lab_checkFunction · 0.45
admitMethod · 0.45

Calls 4

moveFunction · 0.85
assignMethod · 0.80
emptyMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected