Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
jberg5 committed Jan 9, 2025
1 parent d58746b commit b72e27f
Showing 1 changed file with 65 additions and 63 deletions.
128 changes: 65 additions & 63 deletions bindings/python/src/expose-solve.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,67 +140,67 @@ solveDenseQp(nanobind::module_ m)
nanobind::arg("eps_duality_gap_rel") = nanobind::none(),
nanobind::arg("primal_infeasibility_solving") = false,
nanobind::arg("default_H_eigenvalue_estimate") = 0.);
m.def(
"solve_no_gil",
nanobind::overload_cast<optional<dense::MatRef<T>>,
optional<dense::VecRef<T>>,
optional<dense::MatRef<T>>,
optional<dense::VecRef<T>>,
optional<dense::MatRef<T>>,
optional<dense::VecRef<T>>,
optional<dense::VecRef<T>>,
optional<VecRef<T>>,
optional<VecRef<T>>,
optional<VecRef<T>>,
optional<T>,
optional<T>,
optional<T>,
optional<T>,
optional<T>,
optional<bool>,
bool,
bool,
optional<isize>,
proxsuite::proxqp::InitialGuessStatus,
bool,
optional<T>,
optional<T>,
bool,
optional<T>>(&dense::solve<T>),
"Function for solving a QP problem using PROXQP dense backend directly "
"without defining a QP object and while releasing the Global Interpreter Lock (GIL). "
"It is possible to set up some of the solver "
"parameters (warm start, initial guess option, proximal step sizes, "
"absolute and relative accuracies, maximum number of iterations, "
"preconditioner execution).",
nanobind::arg("H"),
nanobind::arg("g"),
nanobind::arg("A").none(),
nanobind::arg("b").none(),
nanobind::arg("C").none(),
nanobind::arg("l").none(),
nanobind::arg("u").none(),
nanobind::arg("x") = nanobind::none(),
nanobind::arg("y") = nanobind::none(),
nanobind::arg("z") = nanobind::none(),
nanobind::arg("eps_abs") = nanobind::none(),
nanobind::arg("eps_rel") = nanobind::none(),
nanobind::arg("rho") = nanobind::none(),
nanobind::arg("mu_eq") = nanobind::none(),
nanobind::arg("mu_in") = nanobind::none(),
nanobind::arg("verbose") = nanobind::none(),
nanobind::arg("compute_preconditioner") = true,
nanobind::arg("compute_timings") = false,
nanobind::arg("max_iter") = nanobind::none(),
nanobind::arg("initial_guess") =
InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS,
nanobind::arg("check_duality_gap") = false,
nanobind::arg("eps_duality_gap_abs") = nanobind::none(),
nanobind::arg("eps_duality_gap_rel") = nanobind::none(),
nanobind::arg("primal_infeasibility_solving") = false,
nanobind::arg("default_H_eigenvalue_estimate") = 0.,
nanobind::call_guard<nanobind::gil_scoped_release>());

m.def("solve_no_gil",
nanobind::overload_cast<optional<dense::MatRef<T>>,
optional<dense::VecRef<T>>,
optional<dense::MatRef<T>>,
optional<dense::VecRef<T>>,
optional<dense::MatRef<T>>,
optional<dense::VecRef<T>>,
optional<dense::VecRef<T>>,
optional<VecRef<T>>,
optional<VecRef<T>>,
optional<VecRef<T>>,
optional<T>,
optional<T>,
optional<T>,
optional<T>,
optional<T>,
optional<bool>,
bool,
bool,
optional<isize>,
proxsuite::proxqp::InitialGuessStatus,
bool,
optional<T>,
optional<T>,
bool,
optional<T>>(&dense::solve<T>),
"Function for solving a QP problem using PROXQP dense backend directly "
"without defining a QP object and while releasing the Global "
"Interpreter Lock (GIL). "
"It is possible to set up some of the solver "
"parameters (warm start, initial guess option, proximal step sizes, "
"absolute and relative accuracies, maximum number of iterations, "
"preconditioner execution).",
nanobind::arg("H"),
nanobind::arg("g"),
nanobind::arg("A").none(),
nanobind::arg("b").none(),
nanobind::arg("C").none(),
nanobind::arg("l").none(),
nanobind::arg("u").none(),
nanobind::arg("x") = nanobind::none(),
nanobind::arg("y") = nanobind::none(),
nanobind::arg("z") = nanobind::none(),
nanobind::arg("eps_abs") = nanobind::none(),
nanobind::arg("eps_rel") = nanobind::none(),
nanobind::arg("rho") = nanobind::none(),
nanobind::arg("mu_eq") = nanobind::none(),
nanobind::arg("mu_in") = nanobind::none(),
nanobind::arg("verbose") = nanobind::none(),
nanobind::arg("compute_preconditioner") = true,
nanobind::arg("compute_timings") = false,
nanobind::arg("max_iter") = nanobind::none(),
nanobind::arg("initial_guess") =
InitialGuessStatus::EQUALITY_CONSTRAINED_INITIAL_GUESS,
nanobind::arg("check_duality_gap") = false,
nanobind::arg("eps_duality_gap_abs") = nanobind::none(),
nanobind::arg("eps_duality_gap_rel") = nanobind::none(),
nanobind::arg("primal_infeasibility_solving") = false,
nanobind::arg("default_H_eigenvalue_estimate") = 0.,
nanobind::call_guard<nanobind::gil_scoped_release>());

m.def(
"solve_no_gil",
Expand Down Expand Up @@ -232,7 +232,8 @@ solveDenseQp(nanobind::module_ m)
bool,
optional<T>>(&dense::solve<T>),
"Function for solving a QP problem using PROXQP dense backend directly "
"without defining a QP object and while releasing the Global Interpreter Lock (GIL). "
"without defining a QP object and while releasing the Global Interpreter "
"Lock (GIL). "
"It is possible to set up some of the solver "
"parameters (warm start, initial guess option, proximal step sizes, "
"absolute and relative accuracies, maximum number of iterations, "
Expand Down Expand Up @@ -318,7 +319,8 @@ solveSparseQp(nanobind::module_ m)
"solve_no_gil",
&sparse::solve<T, I>,
"Function for solving a QP problem using PROXQP sparse backend directly "
"without defining a QP object and while releasing the Global Interpreter Lock (GIL). "
"without defining a QP object and while releasing the Global Interpreter "
"Lock (GIL). "
"It is possible to set up some of the solver "
"parameters (warm start, initial guess option, proximal step sizes, "
"absolute and relative accuracies, maximum number of iterations, "
Expand Down

0 comments on commit b72e27f

Please sign in to comment.