.. _program_listing_file__tmp_ws_src_proxsuite_include_proxsuite_linalg_dense_solve.hpp: Program Listing for File solve.hpp ================================== |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/proxsuite/include/proxsuite/linalg/dense/solve.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp // // Copyright (c) 2022 INRIA // #ifndef PROXSUITE_LINALG_DENSE_LDLT_SOLVE_HPP #define PROXSUITE_LINALG_DENSE_LDLT_SOLVE_HPP #include "proxsuite/linalg/dense/core.hpp" #include namespace proxsuite { namespace linalg { namespace dense { namespace _detail { template void solve_impl(Mat ld, Rhs rhs) { auto l = ld.template triangularView(); auto lt = util::trans(ld).template triangularView(); auto d = util::diagonal(ld); l.solveInPlace(rhs); rhs = rhs.cwiseQuotient(d); lt.solveInPlace(rhs); } } // namespace _detail template void solve(Mat const& mat, Rhs&& rhs) { _detail::solve_impl(util::to_view(mat), util::to_view_dyn_rows(rhs)); } } // namespace dense } // namespace linalg } // namespace proxsuite #endif /* end of include guard PROXSUITE_LINALG_DENSE_LDLT_SOLVE_HPP */