Skip to content

feat: expose max_threads on batch solve/calc-table Python bindings#207

Open
zzcgumn wants to merge 1 commit into
developfrom
feat/expose_parallel_batch_solvers_to_python
Open

feat: expose max_threads on batch solve/calc-table Python bindings#207
zzcgumn wants to merge 1 commit into
developfrom
feat/expose_parallel_batch_solvers_to_python

Conversation

@zzcgumn

@zzcgumn zzcgumn commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add an optional max_threads argument (default 0 = auto) to the solve_all_boards_pbn, solve_all_boards_bin, and calc_all_tables_pbn Python bindings, giving callers control over the worker-thread cap for batch operations.
  • Route these bindings through the threaded C wrappers SolveAllBoardsN, SolveAllBoardsBinN, and CalcAllTablesPBNN, which delegate to the internal solve_all_boards_pbn_n / solve_all_boards_n / calc_all_boards_n helpers.
  • max_threads <= 0 preserves the existing hardware_concurrency() default, so the change is fully backward compatible.
  • Play analysis has no parallel variant, so no binding was added there; the calc-tables family had the same gap as solve and is included here.

Test plan

  • bazel build //python:_dds3 compiles cleanly
  • bazel test //python:solve_all_boards_test //python:calc_tables_test pass (default behavior unchanged)
  • Verified max_threads=1/2/4 is accepted and returns results identical to the default for both solve and calc-table paths
  • CI green

🤖 Generated with Claude Code

Closes #206

Add an optional max_threads argument (default 0 = auto) to
solve_all_boards_pbn, solve_all_boards_bin, and calc_all_tables_pbn,
routing them through the threaded C wrappers SolveAllBoardsN,
SolveAllBoardsBinN, and CalcAllTablesPBNN respectively. These delegate
to the internal solve_all_boards_pbn_n / solve_all_boards_n /
calc_all_boards_n helpers, giving Python callers control over the
worker-thread cap for batch operations. <=0 preserves the existing
hardware_concurrency default, so the change is backward compatible.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@zzcgumn zzcgumn self-assigned this Jun 25, 2026
@zzcgumn zzcgumn requested a review from tameware June 25, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export parallel version of solve all boards to Python.

1 participant