Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
lu_refine.hpp File Reference

Synchronous preserving LU refinement with three explicit precision roles. More...

#include <uni20/linalg/ops/lu.hpp>
#include <uni20/linalg/ops/solve_diagnostics.hpp>
Include dependency graph for lu_refine.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  uni20::linalg::LuRefinementResult< W, R >
 Refinement outcome, retaining the last finite, diagnosed iterate on later failure. More...
 

Namespaces

namespace  uni20
 
namespace  uni20::linalg
 
namespace  uni20::linalg::refinement_detail
 

Functions

template<RealOrComplex S>
auto uni20::linalg::refinement_detail::component_magnitude (S const &value)
 
RefinementInfo uni20::linalg::refinement_detail::conversion_failure (SolveInfo const &info)
 
template<RealOrComplex To, RealOrComplex From>
requires (Complex<To> == Complex<From>)
To uni20::linalg::refinement_detail::convert_scaled (From const &value, std::int64_t exponent, Precision p)
 
template<class Backend , class F , class W , class R >
std::optional< DenseMatrix< W > > uni20::linalg::refinement_detail::correction (Backend &backend, LuFactorization< F > const &factor, DenseMatrix< R > const &rhs, LuRefinementPrecision< F, W, R > p, std::vector< bool > const &active, std::int64_t target_exponent, SolveInfo &info)
 
template<class W , class R , class A , class B >
LuRefinementResult< W, R > uni20::linalg::refinement_detail::empty_result (A const &a, B const &b, Precision working, Precision residual)
 
template<class... Args>
requires requires(Args&&... args) { lu_refine_with_info(std::forward<Args>(args)...); }
auto uni20::linalg::lu_refine (Args &&... args)
 Return the refined solution only on convergence; other outcomes use the terminal error policy.
 
template<RealOrComplex F, RealOrComplex W, RealOrComplex R, refinement_detail::HostMatrix A, refinement_detail::HostMatrix B>
requires (Complex<F> == Complex<tensor_element_t<A>> && Complex<F> == Complex<tensor_element_t<B>>)
auto uni20::linalg::lu_refine_with_info (A const &a, B const &b, LuRefinementPrecision< F, W, R > p, RefinementOptions< make_real_t< R > > const &options={}, LuOptions< make_real_t< F > > const &factor_options={.retain_norms=false})
 Refine with the ordinary host backend selection for the factor scalar.
 
template<KernelBackendSelector Backend, RealOrComplex F, RealOrComplex W, RealOrComplex R, refinement_detail::HostMatrix A, refinement_detail::HostMatrix B>
requires (Complex<F> == Complex<tensor_element_t<A>> && Complex<F> == Complex<tensor_element_t<B>>)
auto uni20::linalg::lu_refine_with_info (Backend &&backend, A const &a, B const &b, LuRefinementPrecision< F, W, R > p, RefinementOptions< make_real_t< R > > const &options={}, LuOptions< make_real_t< F > > const &factor_options={.retain_norms=false})
 Factor at p.factor, then solve and refine with independently selected working/residual arithmetic.
 
template<KernelBackendSelector Backend, RealOrComplex F, RealOrComplex W, RealOrComplex R, refinement_detail::HostMatrix A, refinement_detail::HostMatrix B>
requires (Complex<F> == Complex<tensor_element_t<A>> && Complex<F> == Complex<tensor_element_t<B>>)
auto uni20::linalg::lu_refine_with_info (Backend &&backend, LuFactorization< F > const &factor, A const &a, B const &b, LuRefinementPrecision< F, W, R > p, RefinementOptions< make_real_t< R > > const &options={})
 Refine a preserving solve using existing LU factors and the original A and B.
 
template<RealOrComplex F, RealOrComplex W, RealOrComplex R, refinement_detail::HostMatrix A, refinement_detail::HostMatrix B>
requires (Complex<F> == Complex<tensor_element_t<A>> && Complex<F> == Complex<tensor_element_t<B>>)
auto uni20::linalg::lu_refine_with_info (LuFactorization< F > const &factor, A const &a, B const &b, LuRefinementPrecision< F, W, R > p, RefinementOptions< make_real_t< R > > const &options={})
 Refine from reusable factors with ordinary host solve dispatch.
 
template<class A , class B >
void uni20::linalg::refinement_detail::require_shape (A const &a, B const &b)
 
template<class Backend , class F , class W , class R >
LuRefinementResult< W, R > uni20::linalg::refinement_detail::run (Backend &backend, LuFactorization< F > const &factor, DenseMatrix< R > const &a, DenseMatrix< R > const &b, LuRefinementPrecision< F, W, R > p, RefinementOptions< make_real_t< R > > const &options, make_real_t< R > const &tolerance)
 
template<class F , class W , class R >
auto uni20::linalg::refinement_detail::validate (LuRefinementPrecision< F, W, R > p, RefinementOptions< make_real_t< R > > const &options)
 

Detailed Description

Synchronous preserving LU refinement with three explicit precision roles.