Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
src/uni20/linalg/backends/lapack

This directory contains LAPACK operation-tag backend adapters.

Contents

  • common.hpp: checked LAPACK workspace-query conversion helpers.
  • matrix_norm.hpp: general dense matrix norms through lange.
  • linear_solve.hpp: destructive dense general solves through getrf/getrs, with recoverable numerical diagnostics and an optional relative pivot threshold.
  • lu.hpp: reusable LU factors and solves, with portable zero-based pivots.
  • linear_solve_mpfr.hpp, lu_mpfr.hpp: optional scalar specializations of LapackBackend, included by the corresponding operation headers. They pack logical MPFR/MPC values and pass working precision to the MPLAPACK provider.
  • linear_solve_binary80.hpp, lu_binary80.hpp: binary80 scalar specializations of the same LapackBackend, with provider complex-arithmetic restrictions.
  • decompositions_packed.hpp: shared MPFR/MPC and binary80 QR/LQ, eigensystem and SVD kernels. packed_decomposition_capabilities.hpp checks each provider operation independently.
  • lq.hpp: reduced real or complex LQ factorization through gelqf and orglq/unglq.
  • tridiagonal_eigen.hpp: symmetric tridiagonal eigenvalues and eigenvectors through sterf and steqr.
  • nonsymmetric_eigen.hpp: real and complex nonsymmetric eigensystems through geev, including real conjugate-pair unpacking.
  • self_adjoint_eigh.hpp: real symmetric and complex Hermitian eigensystems through syev/heev.
  • qr.hpp: reduced real or complex QR factorization through geqrf and orgqr/ungqr.
  • svd.hpp: exact real and complex singular value decompositions through gesvd, including values-only, one-sided, complete, and reduced-factor input-overwrite jobs.
  • schur.hpp: real and complex Schur decomposition, real Hessenberg Schur reduction, and Schur block/entry reordering through gees, hseqr, and trexc.

Notes

  • Each operation should provide kernel_accepts_types(LapackBackend, ...) and try_kernel(LapackBackend, ...) over normalized MdspecLike operands with the mutability its provider call requires. The backend acquires host leases, then calls an ordinary operation-specific mdspan leaf and the raw wrappers under the LAPACK provider layer. Resolved mdspans are not redispatched through an operation tag.
  • Return a non-success KernelAttempt only for clean preflight decline. LAPACK INFO failures after a provider call are terminal and must not trigger fallback.
  • Native update-matrix paths require a directly addressable column-major mdspan. Unsupported layouts decline before any operand is modified. MPFR and binary80 specializations instead pack logical host values, including transforming accessors, through the shared ../packed_matrix.hpp helpers.
  • Read-only matrix norms additionally accept row-major storage by exchanging one and infinity norms under the provider transpose. Complex non-Frobenius forms decline because LAPACK's component-sum convention differs from Uni20's mathematical complex magnitude.
  • Keep copy/materialization behavior explicit when adapting tensor views to LAPACK-compatible storage.

Related Documentation