Owned-ThreadData constructor: allocate ThreadData as a member of the SolverContext so callers can create a context at the top of the stack and pass it down without a separate per-thread lookup.
| 12 | // SolverContext so callers can create a context at the top of the stack |
| 13 | // and pass it down without a separate per-thread lookup. |
| 14 | SolverContext::SolverContext(SolverConfig cfg) |
| 15 | : thr_(nullptr), cfg_(cfg) |
| 16 | { |
| 17 | // Create an owned ThreadData instance and keep it in thr_. |
| 18 | thr_ = std::make_shared<ThreadData>(); |
| 19 | // Ensure persistent facades like SearchContext see the bound ThreadData. |
| 20 | search_.set_thread(thr_); |
| 21 | search_.set_owner(this); |
| 22 | } |
| 23 | |
| 24 | auto SolverContext::trans_table() const -> TransTable* |
| 25 | { |
nothing calls this directly
no test coverage detected