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

Owning reusable host LU factors and solves through operation dispatch. More...

#include <uni20/linalg/backends/cpu/lu.hpp>
#include <uni20/linalg/backends/lapack/lu.hpp>
#include <optional>
#include <span>
#include <uni20/linalg/precision.hpp>
#include <uni20/tensor/copy.hpp>
#include <uni20/tensor/precision.hpp>
#include <uni20/tensor/tensor.hpp>
#include <vector>
Include dependency graph for ops/lu.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  uni20::linalg::LuFactorization< S >
 Immutable owning packed factors satisfying P A = L U. More...
 
struct  uni20::linalg::LuFactorizationResult< S >
 Completed factorization attempt; factor is present exactly on success. More...
 

Namespaces

namespace  uni20
 
namespace  uni20::linalg
 

Functions

template<class... Args>
requires requires(Args&&... args) { lu_factor_with_info(std::forward<Args>(args)...); }
auto uni20::linalg::lu_factor (Args &&... args)
 Return completed owning factors; numerical failure uses the terminal error policy.
 
template<RankedTensorView< 2 > A>
requires RealOrComplex<tensor_element_t<A>>
auto uni20::linalg::lu_factor_with_info (A const &a, LuOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Factor with the default backend for the materialized host workspace.
 
template<RankedTensorView< 2 > A>
requires RealOrComplex<tensor_element_t<A>>
auto uni20::linalg::lu_factor_with_info (A const &a, Precision p, LuOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Factor at explicit precision with the default host backend.
 
template<KernelBackendSelector Backend, RankedTensorView< 2 > A>
requires RealOrComplex<tensor_element_t<A>>
auto uni20::linalg::lu_factor_with_info (Backend &&backend, A const &a, LuOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Factor at native precision or the input tensor's finite construction default.
 
template<KernelBackendSelector Backend, RankedTensorView< 2 > A>
requires RealOrComplex<tensor_element_t<A>>
auto uni20::linalg::lu_factor_with_info (Backend &&backend, A const &a, Precision p, LuOptions< make_real_t< tensor_element_t< A > > > const &options={})
 Factor at explicit finite precision, preserving input values and defaults.
 
template<KernelBackendSelector Backend, RealOrComplex S, RankedTensorView< 2 > B>
requires std::same_as<S, tensor_element_t<B>>
auto uni20::linalg::lu_solve (Backend &&backend, LuFactorization< S > const &factor, B const &b)
 Preserve the RHS and return an owning column-major solution at factor precision.
 
template<RealOrComplex S, RankedTensorView< 2 > B>
requires std::same_as<S, tensor_element_t<B>>
auto uni20::linalg::lu_solve (LuFactorization< S > const &factor, B const &b)
 Preserve the RHS and solve with default host backends.
 
template<class... Args>
requires requires(Args&&... args) { lu_solve_inplace_with_info(std::forward<Args>(args)...); }
void uni20::linalg::lu_solve_inplace (Args &&... args)
 Strict solve in an existing RHS workspace; numerical failure is terminal.
 
template<KernelBackendSelector Backend, RealOrComplex S, MutableRankedTensorView< 2 > B>
requires std::same_as<S, tensor_element_t<B>>
SolveInfo uni20::linalg::lu_solve_inplace_with_info (Backend &&backend, LuFactorization< S > const &factor, B &&b)
 Solve in an existing RHS workspace, preserving the factors on every outcome.
 
template<RealOrComplex S, MutableRankedTensorView< 2 > B>
requires std::same_as<S, tensor_element_t<B>>
SolveInfo uni20::linalg::lu_solve_inplace_with_info (LuFactorization< S > const &factor, B &&b)
 Solve in place using the factors' and RHS storage-selected backends.
 

Detailed Description

Owning reusable host LU factors and solves through operation dispatch.