Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[solvers] Port solver back-ends to use SpecificOptions #21345

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 26, 2024

  1. [solvers] Port solver back-ends to use SpecificOptions

    In the near future, we anticipate changing the SolverOptions API in
    support of loading and saving (i.e., serialization). That's especially
    troublesome for our solver back-ends that consume its information,
    given the low-level and hodge-podge ways in which they hunt for and
    apply their specific options.
    
    This commit introduces a higher-level intermediary between solver
    back-ends and the program's options. Now SolverOptions are solely a
    user-facing aspect of defining a program; the solver back-ends never
    touch SolverOptions anymore. The new SolverBase::DoSolve2 virtual
    provides the mechanism for back-ends to take advantage of the new API.
    All solvers have been ported to use it. The old API remains intact for
    any out-of-tree solvers.
    
    The new API is also designed to improve uniformity of common errors,
    such as unknown names or wrongly-typed values.
    
    The new API also lays the groundwork for more efficient processing, as
    future work. It removes the need for the "Merge" (copy) operation in
    the hot path -- since it only provides a *view* of the options, it can
    easily keep track of several dictionaries and query them in order,
    with no copying.
    jwnimmer-tri committed Apr 26, 2024
    Configuration menu
    Copy the full SHA
    878e75d View commit details
    Browse the repository at this point in the history