| 35 | |
| 36 | |
| 37 | auto solve_single_common( |
| 38 | const int thrId, |
| 39 | const int bno) -> void |
| 40 | { |
| 41 | FutureTricks fut; |
| 42 | |
| 43 | // Fallback timing: measure per-board elapsed time (ms) even when |
| 44 | // DDS_SCHEDULER isn't enabled at compile time. This allows the |
| 45 | // dtest -r/--report option to print per-board timings. |
| 46 | START_THREAD_TIMER(thrId); |
| 47 | auto t0 = std::chrono::steady_clock::now(); |
| 48 | int res = SolveBoard( |
| 49 | param.bop->deals[bno], |
| 50 | param.bop->target[bno], |
| 51 | param.bop->solutions[bno], |
| 52 | param.bop->mode[bno], |
| 53 | &fut, |
| 54 | thrId); |
| 55 | auto t1 = std::chrono::steady_clock::now(); |
| 56 | END_THREAD_TIMER(thrId); |
| 57 | |
| 58 | // Compute elapsed milliseconds and publish to scheduler as a |
| 59 | // lightweight fallback. Scheduler will ignore or use this value |
| 60 | // when reporting if full DDS_SCHEDULER timing is not active. |
| 61 | auto dur = std::chrono::duration_cast<std::chrono::milliseconds>(t1 - t0).count(); |
| 62 | if (dur < 0) dur = 0; |
| 63 | scheduler.SetBoardTime(bno, static_cast<int>(dur)); |
| 64 | |
| 65 | if (res == 1) |
| 66 | param.solvedp->solved_board[bno] = fut; |
| 67 | else |
| 68 | param.error = res; |
| 69 | } |
| 70 | |
| 71 | |
| 72 | auto copy_solve_single(const vector<int>& crossrefs) -> void |
no test coverage detected